Hi,

    Following code is giving java.util.NoSuchElementException. The exception is 
thrown at addChild() method.

String xmlString = "<ns1:echo xmlns:ns1=\"http://ws.apache.org/axis2/xsd\";> 
<ns1:echo>Hello</ns1:echo>  </ns1:echo>";
XMLStreamReader parser2 = 
XMLInputFactory.newInstance().createXMLStreamReader(new 
StringReader(xmlString));
OMXMLParserWrapper builder2 = new StAXOMBuilder(parser2);
OMElement documentElement = builder2.getDocumentElement();

SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
 SOAPEnvelope envelope1 = fac.getDefaultEnvelope(); 
envelope1.getBody().addChild( (OMNode)documentElement );
newMsgContext.setEnvelope( envelope1 );

Can anybody help in this regard.





View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137695#4137695

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137695
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to