您的位置:首页 > 其它

byte-array-to-string-transformer 作用

2016-07-10 08:42 239 查看


1.org.mule.transport.http.ReleasingInputStream cannot be cast to java.lang.String

通过调试才发现在调用第三方接口的服务时出现了这种错误。 mule中传输的这个http流不能转换成String类型

在调用第三方接口的过程中如下代码:
<flow name="crmForWssFlow">
<inbound-endpoint address="vm://invoke.crm.wss"  exchange-pattern="request-response"></inbound-endpoint>
<http:outbound-endpoint address="${crmForWss.url}" method="POST" responseTimeout="${default.invoke.timeout}" exchange-pattern="request-response">
</http:outbound-endpoint>
</flow>


就是说从这个输出点传出来的数据不能进行有效的转换

这里我们使用了
<byte-array-to-string-transformer />


inputStream里面传的是字节码 将字节码转换成String 这个属性在好不过了  结果成功了 。。。

ps:当时我再想的时候 想到了mule中的

<http:http-response-to-string-transformer></http:http-response-to-string-transformer>结果还是不能解决这个问题,后来想到inputStream传的是字节码

就想到了这个

相关问题谷歌的连接http://forum.mulesoft.org/mulesoft/topics/beginner_please_help_part_2_result
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: