【发布时间】:2023-03-04 20:51:02
【问题描述】:
我正在尝试让 Flex 与 Spring-WS 网络服务进行通信。但 Flex 生成的 SOAP 请求既未通过 PayloadValidatingInterceptor 也未通过 soapUI 验证。问题似乎与 XML 命名空间的使用有关。
未验证的消息如下所示:
<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>
以下 2 个变体均已验证:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.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>
根据我阅读的文档的理解,第一个版本也应该是有效的。
是不是 Spring 和 soapUI 对他们接受的东西太挑剔了?还是 Flex 生成的 XML 无效?
感谢您的帮助!
【问题讨论】:
标签: apache-flex web-services spring soap