【发布时间】:2012-01-13 11:03:47
【问题描述】:
我遇到了网络服务问题。
我有一个 Web 服务,它使用 IBM Web 服务的堆栈在 WebSphere 应用程序服务器上部署和运行了很长时间。现在我已经将它迁移到 glassfish v2.1.1 到 Axis 1.4 堆栈。 Web 服务的 WSDL 没有更改以保持客户端兼容性
有一个具有布尔返回类型的 Web 服务方法。问题是当我调用我的方法肥皂响应在 glassfish 中返回不同:
例子:
WebSphere:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<checkPendingOperationsResponse xmlns="http://operations.appserver.dealer.omnitel.lt">
<checkPendingOperationsReturn xsi:type="xsd:boolean" xmlns="">0</checkPendingOperationsReturn>
</checkPendingOperationsResponse>
</soapenv:Body>
</soapenv:Envelope>
玻璃鱼:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:checkPendingOperationsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://operations.appserver.dealer.omnitel.lt">
<checkPendingOperationsReturn href="#id0"/>
</ns1:checkPendingOperationsResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:boolean" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">false</multiRef>
</soapenv:Body>
</soapenv:Envelope>
问题是某些客户端无法处理“false”、“true”值,因为之前返回的值是“1”、“0”。
是否有解决方案或无法解决的证据?
提前致谢。
【问题讨论】:
-
Axis 1.x 是一个糟糕的 Web 服务堆栈,在许多情况下只是损坏了。如果您要迁移,请迁移到更现代的东西。
标签: java web-services axis