Mule CXF马歇尔反应

编程入门 行业动态 更新时间:2024-10-20 20:51:28
本文介绍了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马歇尔反应

本文发布于:2023-11-25 23:58:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631851.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:马歇尔   Mule   CXF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!