Hi Chris,
I solved this issue using the Message format itself, but interestingly the
soapaction URL comes in a double quote & camel simple components expects a
single quote around it. After that the choice router delegates the messages
based on the soap action.
This is the working code:
<simple>${in.header.SOAPAction} contains
'"http://test.com/test1/Enquiry"'</simple>
By the way, It will be helpful if you can comment on *' How to retrieve the
soap action in the payload mode ? '*
My current code:
<camelContext id="test-gateway" useMDCLogging="true" handleFault="true"
trace="${camel.context.trace}">
<propertyPlaceholder id="properties" location="ref:com.test.test1" />
<endpoint id="log-info" uri="log:com.test?level=INFO" />
<route id="ws-gateway-request-handler">
<from uri="cxf:bean:test-ws?dataFormat=PAYLOAD" />
<log message="recieved ws payload: ${body}" />
<choice>
<when>
<xpath>/soapenv:Envelope/soapenv:Header/wsa:Action/text()='http://test.com/test1/Enquiry'</xpath>
<to uri="direct:B" />
</when>
<otherwise>
<setFaultBody>
<simple>Invalid Operation</simple>
</setFaultBody>
</otherwise>
</choice>
<log message="sent response payload: ${body}" />
</route>
<route id="Step-2">
<from uri="jms:queue:Hop2" />
<to uri="string-template:samples/adapters/Response.xml" />
</route>
</camelContext>
Regards
Guru
--
View this message in context:
http://camel.465427.n5.nabble.com/Route-based-on-Soap-Action-tp5749316p5749363.html
Sent from the Camel - Users mailing list archive at Nabble.com.