Ashish here again.
I have developed a route which parses incoming SOAP request and logs some of information from the request. I used headers and XPATH for fetching information from SOAP service request. The route successfully parse and logs appropriate information.
The route is as follows:
<route streamCache="true">
<from uri="<some URI>"/>
<setHeader headerName="SOAPAction">
<constant>http://www.something.com/constant>
</setHeader>
<setHeader headerName="actionId">
<xpath resultType="java.lang.String">//ws:actionId/text()</xpath>
</setHeader>
<choice>
<when>
<xpath>//ws:actionId = '1'</xpath>
<to ref="callService" />
</when>
<otherwise>
<log message="Wrong Action ID : ${in.headers.actionId}"
loggingLevel="ERROR"/>
</otherwise>
</choice>
</route>
As per logic the route must redirect to callService URI if actionId is 1, otherwise it should log wrong action Id without any response.
The logic works if actionId is 1, it redirects to callService and sends appropriate response to caller. If actionId is other than 1, it writes the log about wrong action Id with action Id but it sends the same request as response to the caller.
I checked it using soapUI and Java Socket Programming.But output is same, logs the actionId accurately but sends the same request as response to the caller.
I don't want same request as response. Response must be blank.
Can anybody help me to find the solution.
Regards,
Ashish