我对mule有点陌生,我不能解决我遇到的一个问题。下面是发生的事情:我在mule 3.2.0中有一个流,它接收对ws的请求的对象。我使用cxf:jaxws-client和将其发送到ws。在这个流程的开始,我使用了vm:inbound端点with request-response模式。我想要的是对作为响应从"vmIn端点“返回的对象应用转换,然后再将其从流的"vm.logService端点”发送回调用者。我实际上得到了响应,但它是空有效负载。"vm.logService“是我用MuleClient.send(网址,消息,属性)从Java代码发送MuleMessage到的端点,我读到过这应该通过"response”块来完成,但似乎这并没有发生。
这是我的配置
<vm:endpoint name="vmOut" path="vmOut" exchange-pattern="request-response"/>
<vm:endpoint name="vmIn" path="vmIn" exchange-pattern="request-response"/>
<pattern:web-service-proxy
name="name"
inboundEndpoint-ref="vmIn"
transformer-refs="logging"
responseTransformer-refs="logging"
outboundEndpoint-ref="vmOut" />
<flow name="logService">
<vm:inbound-endpoint path="vm.logService"/>
<vm:outbound-endpoint ref="vmIn">
<cxf:jaxws-client serviceClass="my.WSClass" operation="operation"
enableMuleSoapHeaders="false"/>
<object-to-string-transformer/>
</vm:outbound-endpoint>
<response>
<custom transformer name="myTransformer" class="someclass" />
</response>
<flow name="genericTransformer">
<vm:inbound-endpoint path="vmOut"/>
<custom-transformer class="mypkg.GenericServiceTransformer">
</custom-transformer>
</flow>
<flow name="import">
<vm:inbound-endpoint path="vm.import" exchange-pattern="request-response"/>
<http:outbound-endpoint address="${Service}" responseTimeout="${ws.timeout}" exchange-pattern="request-response" />
<object-to-string-transformer/>
</flow>好吧,在用jaxws-client发送之后,我有更多的流来处理这个请求消息,但我不认为这是它不工作的原因。提前感谢您的帮助
发布于 2012-12-12 06:19:14
在我看来,"vm.logService“VM端点看起来不像是请求-响应:因为您没有指定交换模式,所以在缺省情况下它实际上是单向的。这就可以解释为什么你什么都拿不回来了。
此外,我们没有看到"vmIn“的定义,所以我们不能确保它是正确的请求-响应,这可能是无法到达响应块的另一个原因。
实际上:如果您的响应块是流中的最后一个元素,则不需要它:如果在请求阶段应用"myTransformer“也没问题,因为之后就什么都没有了。
在使用jaxws-client发送之后,我还有几个处理此请求消息的流
我真的不明白你这么说是什么意思。
https://stackoverflow.com/questions/13826980
复制相似问题