[jboss-user] [JBoss Web Services] - Re: Editing an outbound soap message

Branislav Milojkovic do-not-reply at jboss.com
Mon Mar 7 12:10:04 EST 2011


Branislav Milojkovic [http://community.jboss.org/people/crazypenguin] created the discussion

"Re: Editing an outbound soap message"

To view the discussion, visit: http://community.jboss.org/message/591689#591689

--------------------------------------------------------------
I have found a solution. The thing was to use this bit of code for editing SOAP

SOAPFactory factory = SOAPFactory.newInstance();
SOAPElement signatureElement = factory.createElement("Signature");
signatureElement.addTextNode(signature);                    
firstChild.appendChild(signatureElement);

in stead of this:

Element element = firstChild.getOwnerDocument().createElement("Signature");
element.setNodeValue(signature);
firstChild.appendChild(element);

Apparently, the second version will work with appache-commons, but not with JBoss for some reason. Hope this helps someone.

Regards,
Branislav
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/591689#591689]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110307/871a816d/attachment.html 


More information about the jboss-user mailing list