1
votes

I'm kinda new to mule esb, and I can't resolve one trouble I got. Here is what happens: I have a flow in mule 3.2.0, which receives object with request to a ws. I send it to ws with cxf:jaxws-client and. At the beginning of this flow I have vm:inbound endpoint with request-response pattern. What I want is to apply transformation to the object returned as response from the "vmIn endpoint" before it gets send back to the caller from the "vm.logService endpoint" of the flow. I actually get the response, but it's null payload. The "vm.logService" is the endpoint to witch I send MuleMessage from the Java code with MuleClient.send(url, message, properties).I've read that this should be done with the "response" block, but it seems that this is not happening.

Here is my configuration

<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>

Well, after sending with jaxws-client I have few more flows where this request message is processed, but I don't think that this is the reason why it's not working. Thanks in advance for any help

1

1 Answers

1
votes

The "vm.logService" VM endpoint doesn't look request-response to me: since you don't specify an exchange pattern, it is actually one-way by default. That could explain why you don't get anything back.

Also we don't see the definition of the "vmIn" so we can't be sure it's correctly request-response, which could be another reason for not reaching the response block.

Actually: if your response block is the last element in the flow, you don't need it: it's OK if "myTransformer" is applied in the request phase since there's nothing after.

after sending with jaxws-client I have few more flows where this request message is processed

I really don't understand what you mean by that.