axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcello <>
Subject handler: manipulating messages with DOM
Date Wed, 05 Sep 2007 10:24:10 GMT

I'm trying to manipulate a response message using DOM on Axis 1.1, but I'm
not sure about the flow I should follow.

I've tried the following:

Message response = msgContext.getResponseMessage();
SOAPEnvelope responseEnvelope = response.getSOAPEnvelope();
SOAPBodyElement sbe = (SOAPBodyElement) responseEnvelope.getFirstBody();
doc = sbe.getAsDOM();
... manipulate doc
SOAPBodyElement newBody = new SOAPBodyElement(doc.getDocumentElement());

As a test, I've tried to run the code above without doing any modification
to the DOM document, just to see if it gave me the result I expected (a
modified message identical to the original), but it didn't. I get an invalid
message which brings to a casting exception in the following phases.

What I'm I doing wrong?

Thanks in advance.

Marcello Desantis
Storming Sas

View this message in context:
Sent from the Axis - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message