Jaxb validation does not know prefix inside xsi:type.
-----------------------------------------------------
Key: XFIRE-840
URL: http://jira.codehaus.org/browse/XFIRE-840
Project: XFire
Issue Type: Bug
Components: JAXB 2.0
Affects Versions: 1.2.4
Environment: enabled validation: JaxbType.ENABLE_VALIDATION=true
style: document/literal
Reporter: Ivo Danihelka
Assigned To: Dan Diephouse
Attachments: helloSchema.xsd
The JAXB 2.0 validation fails on a valid message. It is not able to see
namespace prefix declared inside the soapenv:Envelope element. The prefix is
used inside xsi:type sent from some clients (gSOAP).
Message example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:hello">
<soapenv:Header/>
<soapenv:Body>
<urn:helloRequest>
<address xsi:type="urn:Address">
<city>Prague</city>
</address>
</urn:helloRequest>
</soapenv:Body>
</soapenv:Envelope>
The validation fails on the xsi:type="urn:Address", it does not know the "urn"
prefix. But the "urn" prefix declared above.
Raised error message:
org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot resolve 'urn:Address'
as a QName: the prefix 'urn' is not declared.
at
com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:109)
...
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:309)
at org.codehaus.xfire.jaxb2.JaxbType.readObject(JaxbType.java:196)
at
org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:162)
...
It is interesting that the XFire is able to validate the message if the prefix
is declared inside the message body (e.g.,
<address xsi:type="urn:Address" xmlns:urn="urn:hello"> ).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email