cxf - 骡 CXF 编码(marshal)响应

标签 cxf mule

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

相关文章:

java - 使用 Apache CXF 通过 REST 解析 String[] 请求参数

spring - 骡子 : Calling a Rest service on mule context startup

java - 通过 RESTful CXF 使用多部分/表单数据

java - 用于多个 WSDL 绑定(bind)的单个文件

java - CXF 3.0.4 SOAP客户端拦截器传递参数

Mule Dataweave 按多个值排序

mule - DataWeave 2 中的空检查

java - 在 ws 端点部署中检测到 Apache CXF 库

Mule:使用比 mule 服务器捆绑库中捆绑的更高版本的 spring 和 hibernate

java - 如何有效地关闭来自 Mule-3 的 JMS 连接