I was initially getting error with SOAPENC arrays but after rewriting, I
checked for the WS-I basic profile compliance and it seems to be good.
The problem I am facing is w.r.t the QNAMES.

Please find the code snippets that explains the problem 

The web service response is:
<snp:m_Header
xmlns:snp="urn:SentryService"><m_SessionID>SESSION2</m_SessionID></snp:m_Header>

And I am trying to get m_SessionID as follows:
                MHeaderDocument document = stub.Logon(); // stub is the 
XmlBeans generated
Service Stub 
                String sessionId = document.getMHeader().getMSessionID();

I am getting sessionId as null and only works after this modification

MHeaderDocument document = stub.Logon(); // stub is the XmlBeans generated
Service Stub 
String text = document.xmlText().replaceAll("m_SessionID",
"snp:m_SessionID"); //adding qnames
document = MHeaderDocument.Factory.parse(text); //parse again with the new
xml text
String sessionId = document.getMHeader().getMSessionID();

Hope this explains my problem. Please let me know, if you need any other
info.

Thank you





-- 
View this message in context: 
http://www.nabble.com/Problem-reading-child-element-without-QNAME-tp20341271p20361365.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to