如何';s Mule<;对象到字符串转换器>;与message.getPatyloAdassString()不同
我有一个soap服务流,它通过如何';s Mule<;对象到字符串转换器>;与message.getPatyloAdassString()不同,mule,Mule,我有一个soap服务流,它通过获取入站请求。我在它后面有一个设置的有效载荷,以获得字符串形式的有效载荷 以下是我的流程: <flow name="soapService"> <http:inbound-endpoint address="${service.address}" exchange-pattern="request-response"> <cxf:proxy-service wsdlLocation="classpath:serv
获取入站请求。我在它后面有一个设置的有效载荷,以获得字符串形式的有效载荷
以下是我的流程:
<flow name="soapService">
<http:inbound-endpoint address="${service.address}" exchange-pattern="request-response">
<cxf:proxy-service wsdlLocation="classpath:service.wsdl" namespace="http://pennmutual.com/services/mvi" service="MVIService" enableMuleSoapHeaders="false"/>
</http:inbound-endpoint>
<set-payload value="#[message.payloadAs(java.lang.String)]"/>
.
.
.
</flow>
.
.
.
可以工作,但是如果我用
替换它,它就不工作了
这两种方法有什么本质区别
更新:
在我的上述流程中将
替换为
时,#[payload]
给出com.ctc.wstx.sr。ValidatingStreamReader@429eb61a
而不是atcualXMLmessage.payloadAs(java.lang.String)
依赖于Mule的自动转换框架:我认为它选择了
而不是
作为最合适的转换器。两者应该是等效的。那你说“它不起作用”是什么意思?佩费托!!你太棒了:)