JBoss Community

Re: Editing an outbound soap message

created by Branislav Milojkovic in JBoss Web Services - View the full discussion

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

Start a new discussion in JBoss Web Services at Community