JBoss Community

Editing an outbound soap message

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

Hi all,

I have a need to intercept an outbound SOAPMessage and add some info to it (used to sign the request).

 

I am using JBoss version 4.2.3. I get the following exception

 

...

Caused by: org.jboss.util.NotImplementedException: setTextContent

    at org.jboss.ws.core.soap.NodeImpl.setTextContent(NodeImpl.java:652)

...

 

When invoking the second line from this piece of code:

 

...

Element element = node.getOwnerDocument().createElement(elementName);

element.setTextContent(elementText);

node.appendChild(element);

...

 

Now, if i do this in a non-ejb project, the SOAPMessage instance is one from appache-commons and that works fine, since tracking down the node I need leads me to appache implementation of the Node interface, which happens to have the setTextContent method not throw an exception. :)

 

Now, two solutions that come to my mind is

1) There is another way to modify an outbound SOAPMessage that I am not aware of (*crosses fingers*)

2) Somehow disable SOAP handling from JBoss, which will hopefully result in appache handling it.

 

Ideas? Hope I'm not giving too few details, I just don't want this message to be any longer than it needs to. (:

 

Kind regards,

Branislav.

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community