I have a proxy service which is exposed on http. After receiving the request the service validates it against its schema. Now if a validation fails, the service should send back client an error response and should also send that error message to a queue.
<validate [source="xpath"]>
<property name="validation-feature-id" value="true|false"/>*
<schema key="string"/>+
<on-fail>
mediator+
</on-fail>
</validate>
Problem:
I am making a custom message in "Validate" mediator "on-fail" sequence. I am sending back that message by using "Response" mediator. After sending back the response I want to send this same error message to a jms queue. But the problem is that after "Respond" mediator, no mediator works and if I put "Call" mediator" before the "Respond" mediator, only message is sent to queue, no response is sent back to client.
Things to achieve: To summarize, I need to do following two things in a validate mediator fault sequence.
- Send Back the Response to client.
- Send the response to a queue.
how can I achieve that or is there any alternative approach to achieve this task?