axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sardar Hussain <>
Subject [AXIS2] SOAPENVELOPE Parsing
Date Mon, 31 Jan 2011 21:05:43 GMT

I am implementing a Handler where I need to catch and parse the SOAPEnvelope from the MssageContext,
however I am getting problem with printing its nodes.

My code as as follows:

SOAPEnvelope env = messageContext.getEnvelope();
        Iterator bodyElements = env.getBody().getChildElements();
        Iterator headerElements = env.getHeader().getChildElements();

while (bodyElements.hasNext()) {

            OMElement element = (OMElement);
                System.out.println("Body Elements \n  " + element.getText());


        while (headerElements.hasNext()){

            OMElement element = (OMElement);
                System.out.println("\n Header Elements\n"+element.getText());

When I print the SOAPEnvelope then I can print that and see however when I iterate them as
above in the code then Its empty and don't display anything.

Any clue plz?


View raw message