You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Laurent Perez <ha...@gmail.com> on 2009/01/19 11:39:03 UTC

Expected usage of soapEnvelope.getAsDocument() ?

Hi list, hope you are still alive :x

Using Axis 1.4, JDK6.

I wrote an Axis handler to log SOAP requests nodes, and I'm facing a
weird situation : when I use getElementsByTagName on a SOAP body, it
will not find my child elements, but if I obtain a DOM from the
SOAPEnvelope, it will find them :

SOAPBody body = msg.getSOAPBody();
NodeList nodes = body.getElementsByTagName("SessionId"); // will not
find <SessionId> node
SOAPEnvelope envelope = msg.getSOAPEnvelope();
dom = envelope.getAsDocument();
nodes = dom.getElementsByTagName("SessionId"); // will find <SessionId> node

Is it an expected behaviour ?

thanks


-- 
<a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
- Mobile world, technology and more</a>