Please have a look at the Javadoc of OMElement#getText():

http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html#getText()

Andreas

On Mon, Jan 31, 2011 at 22:05, Sardar Hussain <[email protected]> wrote:
>
> Hi,
>
> 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) bodyElements.next();
>             if(element.getText()!=null)
>                 System.out.println("Body Elements \n  " + element.getText());
>
>             }
>
>         while (headerElements.hasNext()){
>
>             OMElement element = (OMElement) headerElements.next();
>             if(element.getText()!=null)
>                 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?
>
> Sardar
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to