mardi 2 juin 2015

Spring Integration WS: mock Endpoint to return response

I have setup a Spring Integration flow configuration to send messages to an external web service and then unmarshalling the response and then doing some post processing based on the response object type.

I have the following outbound-gateway configuration:

<int:channel id="sendRequestChannel"/>
<ws:outbound-gateway request-channel="sendRequestChannel" uri="${send.ws.uri}" reply-channel="responseTransformer" >
    <ws:request-handler-advice-chain>
        <ref bean="retryAdviceUserUpdateWs" />
    </ws:request-handler-advice-chain>
</ws:outbound-gateway>

Now, I want to test the flow and check that the correct post processing is triggered based on the response object.

Is there anyway in my integration test to mock the Endpoint response based on the message I'm sending?

Aucun commentaire:

Enregistrer un commentaire