-
Notifications
You must be signed in to change notification settings - Fork 317
Description
Lukas Krecan opened SWS-523 and commented
I have following SOAP request.
<soapenv:Envelope xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns:getRights>
<ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
<ns:msisdn>420123456789</ns:msisdn>
</ns:customerCredential>
</ns:getRights>
</soapenv:Body>
</soapenv:Envelope>
When umarshalling is called only the payload is passed to the unmarshaller. So DOM equivalent of following is used
<ns:getRights>
<ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
<ns:msisdn>420123456789</ns:msisdn>
</ns:customerCredential>
</ns:getRights>
Please note that namespace prefix ns is not defined. Usually this is not a problem since in DOM namespaces are already resolved. There is one exception - attribute value. When XmlBeans try to unmarshall the element, they are not able to resolve the namespace and do not work correctly. I assume that Spring-WS should somehow take this situation into account.
If following request is used (the only difference is position of ns prefix declaration) everything works fine
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns:getRights xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0">
<ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
<ns:msisdn>420123456789</ns:msisdn>
</ns:customerCredential>
</ns:getRights>
</soapenv:Body>
</soapenv:Envelope>
Affects: 1.5.6, 1.5.7
Reference URL: http://forum.springsource.org/showthread.php?t=71673
Attachments:
- test-ws-1.0-SNAPSHOT-src.zip (5.61 kB)
- test-ws-1.0-SNAPSHOT-src.zip (5.57 kB)
Issue Links:
-
Namespace prefix in attribute value not resolved correctly [SWS-509] #639 Namespace prefix in attribute value not resolved correctly
-
Payload unmarshalling fails when soap body element attribute references namespace declared in envelope [SWS-565] #686 Payload unmarshalling fails when soap body element attribute references namespace declared in envelope
1 votes, 0 watchers