You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Padraic Renaghan <pr...@csc.com> on 2005/02/11 05:03:14 UTC

cursor.getObject not strongly typed

I've got an application where I am receiving a SOAP response from
a remote server. I have an xsd which defines what is inside the soap body.
The xsd does not include the soap envelope and soap body tags.

So to minimize parsing, I figured I'd let xmlbeans parse the entire 
response
xml, then create a cursor on the xmlobject, then walk through the soap 
envelope
and soap body. At that point my cursor would be at the "guts" of the 
response, 
the body part for which I have an xsd.

I was hoping then at that point that a cursor.getBody() in the right place 
would
return me a strongly typed xmlbeans object.

It doesn't. It gives me a xmlbeans ANY type object.

If I take the getBody results and force a parse with
 XmlBeans.Factory.parse(cursor.getBody().xmlText()) 
then I DO get back a properly strongly typed object. So I'm therefore 
confident
that my cursor is in the right spot.

Is there any way to get a strongly typed doc in my case back from 
getBody()?

If not, what is the most efficient way to re-parse, or hopefully NOT 
reparse to get
the strongly typed object?

Thanks,
Padraic