I am trying to get Flex to communication with a Spring-WS webservice. But Flex generates a SOAP request that is not validated either by a PayloadValidatingInterceptor nor by soapUI. The problem seems to be related to the use of XML namespaces.
The not validated message looks like :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header/>
<soapenv:Body>
<getAccountDataRequest xmlns="http://test.com/services/Account">
<accountNumber>537048.001</accountNumber>
</getAccountDataRequest>
</soapenv:Body>
</soapenv:Envelope>
The 2 following variants are both validated :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap开发者_如何学Go.org/soap/envelope/" >
<soapenv:Header/>
<soapenv:Body>
<ac:getAccountDataRequest xmlns:ac="http://test.com/services/Account">
<accountNumber>537048.001</accountNumber>
</ac:getAccountDataRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ac="http://test.com/services/Account">
<soapenv:Header/>
<soapenv:Body>
<ac:getAccountDataRequest>
<accountNumber>537048.001</accountNumber>
</ac:getAccountDataRequest>
</soapenv:Body>
</soapenv:Envelope>
From my understanding of the documentations I have read, the first version should be valid as well.
Is it Spring and soapUI that are too picky in what they accept ? Or is Flex generating invalid XML ?
Thanks for the help !
I finally added elementFormDefault="qualified"
to the XSD defining my webservice, and now everybody agrees that the messages generated by Flex are correct.
精彩评论