gpt4 book ai didi

cxf - 骡 CXF 编码(marshal)响应

转载 作者:行者123 更新时间:2023-11-30 23:48:26 25 4
gpt4 key购买 nike

我在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com