axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Demetris <demet...@ece.neu.edu>
Subject RPC SOAP
Date Sun, 25 Apr 2010 05:20:03 GMT

Why is the Body print showing this 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
that belongs to the Envelope? And it seems that messes up the Iterator 
loop that returns
nothng. I am missing something in the response content access?

Thanks

                SOAPBody body = response.getEnvelope().getBody();
                System.out.println("Env: 
"+response.getEnvelope().toString());
                System.out.println("Body: 
"+response.getEnvelope().getBody().toString());
               
                OMElement element = body.getFirstElement();
                System.out.println("First element: "+element.getText());

                Iterator<?> values = body.getChildren();
                while (values.hasNext()) {
                    OMElement elem = (OMElement) values.next();
                    System.out.println("Result: " +
                            elem.getText());
                }                       


Env: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:getBooksResponse

xmlns:ns="http://myBooksAxis2.axis2.apache.org"><ns:return>Software 
Engineering</ns:return><ns:return>Limits of 
Computation</ns:return><ns:return>Digital 
Circuits</ns:return><ns:return>Disruptive 
Technologies</ns:return><ns:return>Mobile 
Computing</ns:return></ns:getBooksResponse></soapenv:Body></soapenv:Envelope>

Body: <soapenv:Body 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><ns:getBooksResponse 
xmlns:ns="http://myBooksAxis2.axis2.apache.org"><ns:return>Software 
Engineering</ns:return><ns:return>Limits of 
Computation</ns:return><ns:return>Digital 
Circuits</ns:return><ns:return>Disruptive 
Technologies</ns:return><ns:return>Mobile 
Computing</ns:return></ns:getBooksResponse></soapenv:Body>

First element:   <=== empty but it should't be

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message