Thank you Yashwanth, but can you kindly look at the body parsing section please.
sardar --- On Mon, 31/1/11, Yashwanth Rajaram -X (yrajaram - Zensar at Cisco) <[email protected]> wrote: From: Yashwanth Rajaram -X (yrajaram - Zensar at Cisco) <[email protected]> Subject: RE: [AXIS2] SOAPENVELOPE Parsing To: [email protected], [email protected] Date: Monday, 31 January, 2011, 16:05 Sardar: I am not very sure but if I remember right to access the Header elements you have to do : SOAPHeaderBlock element = ElementHelper.toSOAPHeaderBlock((OMElement) headerElements.next(),soapFactory); // ie you can’t access as OMElement Then you can print using element.getText(); cheers, -- Yashwanth From: Sardar Hussain [mailto:[email protected]] Sent: Monday, January 31, 2011 1:06 PM To: [email protected] Subject: [AXIS2] SOAPENVELOPE Parsing 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
