We're having an issue using XmlBeans to parse portions of a StAX stream.
Take for instance a request like so:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<Foo
xsi:type="xsd:string"xmlns="http://foo.com/bar">T</RefNum>
</Header>
</Request>
</soapenv:Body>
If we're using XmlBeans to only parse the Foo element, this causes an
issue. When XmlBeans generates the document that represents Foo it
doesn't pull the xsd namespace from Envelope (which makes sense). But
XmlBeans doesn't want to parse the document unless there is that xsd
declaration. An example exception:
org.apache.xmlbeans.XmlRuntimeException: error: cvc-elt.4.1: Invalid xsi:type
qname: 'xsd:string' in element [EMAIL
PROTECTED]://www.paraware.com/2005/PriceAndAvailabilityCheckRequest
at
com.paraware.webservice.selfservice.PriceAndAvailabilityServiceImpl.checkPriceAndAvailability(PriceAndAvailabilityServiceImpl.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Any ideas on solutions for this issue? If we saved the namespace
declarations, is it possible to redeclare the namespaces somewhere
before validation?
Thanks,
- Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]