Reputation: 7590
I am exposing a CXF service using Mule ESB and i need to pass on the request as is to the Conditional routers. Most of the examples I see pass the response to conditional routers.
How do I pass the request forward without changing the wsdl?
Upvotes: 2
Views: 346
Reputation: 7590
I used a web-service-proxy pattern provided by Mule ESB 3
<pattern:web-service-proxy name="theProxy"
outboundAddress="vm://theProxyFlow"
wsdlFile="classpath:wsdl/MyWsWSDL.wsdl" inboundAddress="${inbound.url}" transformer-refs="RequestToString">
</pattern:web-service-proxy>
And the VM endpoint actually does the Condition based routing by using xpath expression. However I had to write a "RequestToString" custom transformer so that I could apply xpath on the incoming SOAP payload.
I used the following transformation in the transformer -
if (src instanceof InputStream)
{
InputStream input = (InputStream) src;
try
{
reqAsString = IOUtils.toString(input);
}
finally
{
IOUtils.closeQuietly(input);
}
}
Upvotes: 1
Reputation: 33413
I'll revise this answer when the OP will have given more precision
Place a choice routing message processor after the component that implements your web service.
Upvotes: 2