Well, I'd say that you did not rewrote the WSDL enough to be able to use XmlBeans. As you seem to be aware, XmlBeans wasn't designed specifically for WebServices, and SOAP adds some extra rules that don't exist in "pure XML/XMLSchema", one of these rules being the "soapenc:arrayType" attribute. I can't say with 100% certainty that I understand from your post what is the problem that you are having, but my guess is that it is related to the "soapenc:arrayType" attribute. If I remember the SOAP rules correctly, this attribute is used to give the type of the children elements of the element that it appears on, instead of letting the QName of the children determine their type, if that makes sense. Since XMLBeans doesn't have special handling for "soapenc:arrayType", it can't set the type properly, which is why the getters don't seem to work.
If my guess is correct, then the only remedy I can think of would be for you to parse the value of the "soapenc:arrayType" attribute, look up the type referred by it and the use XmlObject.changeType() on the children to set the correct type before trying to access their value. And one note, as far as I know, the newest WS specs discourage the use of SOAP RPC-encoded messages (in favor of doc-encoded), specifically for the reason that they re-invent established XMLSchema rules. Radu > -----Original Message----- > From: pattabi [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 05, 2008 5:01 AM > To: [email protected] > Subject: Problem reading child element without QNAME > > > Hi, > > I am consuming a third-party service that uses SOAP-ENC > arraytypes. I rewrote the WSDL so that I could use XmlBeans. > The service returns an array of Complex Type element with its > attributes are of simple types. When I print the xmltext, it > works fine but when I access the child element, I noticed > that it is looking for a child element with QNAMEs. > > I had similar problem at the root of the response. The > service was returning like this <snp:GetNAICs > xmlns:snp="urn:SentryService"> > <return soapenc:arrayType="q1:CSentryNAIC[53]" > xmlns:q1="urn:SentryService"> > > Then I modified the xml like below to work. > <snp:GetNAICs xmlns:snp="urn:SentryService"> > <snp:return soapenc:arrayType="q1:CSentryNAIC[53]" > xmlns:q1="urn:SentryService"> > > I tried the same trick here but did not work. > > XMLText output: > <?xml version="1.0" encoding="UTF-8"?> > <xml-fragment xmlns:q1="urn:SentryService" > xmlns:snp="urn:SentryService" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> > <iNAICID>25001</iNAICID> > <sName>Lexington Insurance Company</sName> > <sNAICNbr>19437</sNAICNbr> > </xml-fragment> > > I get null when I access 'sName'. > > Could anyone provide me a solution to access this? > > Thanks > > -- > View this message in context: > http://www.nabble.com/Problem-reading-child-element-without-QN > AME-tp20341271p20341271.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] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

