I've been experimenting with modifying message data in a handler (I want to implement simple Adobe-style "encryption" of content using a substitution cipher) and having a very hard time getting this to work cleanly. The only way I could find to directly access the XML structure of the SOAP-BODY was to getBodyElements() on the SOAPEnvelope, then cast them to MessageElements and getAsDOM(). That allows me to manipulate the XML - but the changes I make don't appear to effect what gets processed further down the handler chain, so it looks like getAsDOM() just returns a clone of the structure.

MessageElement itself doesn't allow for easy modification of data - it supplies add and remove methods, but no replace that I could find. Is there any way to transform text content without completely rebuilding the body of the message?

Thanks,

- Dennis

Reply via email to