我在 Mule 3 中使用 cxf:jaxws-client,我从 Web 服务调用中得到的响应是 ReleasingInputStream 类型。我曾尝试添加 http-response-to-message-transformer,但这会产生错误 - 有谁知道我如何将响应作为对象而不是 ReleasingInputStream 来检索?
非常感谢。
最佳答案
为了解决这个问题,把 <cxf-client>
内<outbound-endpoint>
部分(不是之前),通过修改以下代码
<cxf:jaxws-client
clientClass="com.xyz.services.WSServices"
port="WSServicesSoap"
wsdlLocation="classpath:wsdl-file.wsdl"
operation="GimmeDataOperation" />
<outbound-endpoint exchange-pattern="request-response" address="http://localhost:8083/OutboundService" />
产生
ReleasingInputStream
输出到 <outbound-endpoint exchange-pattern="request-response" address="http://localhost:8083/OutboundService" >
<cxf:jaxws-client
clientClass="com.xyz.services.WSServices"
port="WSServicesSoap"
wsdlLocation="classpath:wsdl-file.wsdl"
operation="GimmeDataOperation" />
</outbound-endpoint>
返回预期的对象。
关于cxf - 骡 CXF 编码(marshal)响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6345876/