4
- 客户是使用SOAP::Lite Perl脚本。
- 服务器是使用Spring和CXF的基于Java的应用程序。
我的客户是基于WSDL产生以下SOAP请求:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<createFolder xmlns="http://xyz.com/">
<parentId xsi:type="xsd:string">1</parentId>
<folderName xsi:type="xsd:string">Test</folderName>
</createFolder>
</soap:Body>
</soap:Envelope>
这个请求将无法针对CXF。几次调查后,我发现了以下手动生产要求将工作:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xyz="http://xyz.com/">
<soap:Body>
<xyz:createFolder>
<parentId xsi:type="xsd:string">1</parentId>
<folderName xsi:type="xsd:string">Test</folderName>
</xyz:createFolder>
</soap:Body>
</soap:Envelope>
的区别是元素createFolder
命名空间的定义。
我的问题是:如何配置SOAPLite来创建工作的SOAP请求?
反之亦然:如何将CXF配置为接受SOAP :: Lite请求样式?
它也可能是CXF的配置问题。 – Philipp 2012-04-11 13:24:28