本文介绍了Mule CXF马歇尔反应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Mule 3中使用cxf:jaxws-client,并且从Web服务调用获得的响应的类型为ReleasingInputStream.我曾尝试添加http-response-to-message-transformer,但这会产生错误-有谁知道我如何将响应作为对象而不是ReleasingInputStream来检索?
I am using cxf:jaxws-client in Mule 3 and the response I get from my web service call is of type ReleasingInputStream. I have tried adding the http-response-to-message-transformer, but that generates an error - does anyone know how I can retrieve the response as an object as opposed to a ReleasingInputStream?
非常感谢.
推荐答案要解决此问题,请通过修改以下代码,将<cxf-client>放在<outbound-endpoint>部分中(不要先于此)
To solve the issue put the <cxf-client> inside the <outbound-endpoint> section (NOT BEFORE IT), by modifying the following code
<cxf:jaxws-client clientClass="com.xyz.services.WSServices" port="WSServicesSoap" wsdlLocation="classpath:wsdl-file.wsdl" operation="GimmeDataOperation" /> <outbound-endpoint exchange-pattern="request-response" address="localhost:8083/OutboundService" />会生成
<outbound-endpoint exchange-pattern="request-response" address="localhost:8083/OutboundService" > <cxf:jaxws-client clientClass="com.xyz.services.WSServices" port="WSServicesSoap" wsdlLocation="classpath:wsdl-file.wsdl" operation="GimmeDataOperation" /> </outbound-endpoint>返回期望的对象.
更多推荐
Mule CXF马歇尔反应
发布评论