axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: [AXIS2] SOAPENVELOPE Parsing
Date Tue, 01 Feb 2011 05:56:55 GMT
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 <salarzi_qau@yahoo.com> 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message