Search code examples
javaxmlsoaphandlerjmx-ws

Outbound SOAP Handler to edit full SOAPMessage


Is there a way to retrieve the full SOAP message to handle it (envelope and all) when using the javax.xml.soap.SOAPMessage class?

I am using JMX-WS and want to edit the outbound SOAP Message from the server, in order to append two characters to the message AFTER the end closing tag of the envelope, as the client legacy code is expecting it. So ideally I would like to be able to edit the full message as a String, is this possible?


Solution

  • You can do this with cxf :

    http://www.mastertheboss.com/web-interfaces/337-apache-cxf-interceptors.html

    Take a look at the LogInterceptor example