You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by awilliams <as...@mac.com> on 2016/08/10 15:20:36 UTC

Re: Chaining web service calls in a route

I've now resolved this. The problem was that the web service consists of two
operations and for some reason when I called the producer endpoint it was
selecting the first operation by default - same parameter but different
return value.

Therefore all I had to do was to tell Camel explicitly which operation I
wanted to be called by setting the appropriate header:

    <route id="Request: Store Request">
            <from uri="cxf:bean:inboundRequest" /> (signature = "MyResponse
request(MyRequest)") 
                
            <setHeader headerName="operationName">
                <constant>execute</constant>
            </setHeader> 
        
            <to uri="cxf:bean:inboundExecute" /> (signature = "MyResults
execute(MyRequest)") 
    </route>

I'm guessing that if my web service operations would have had different
parameter types then camel/cxf would have been able to work out which one to
call without me having to explicitly tell it.

The Camel in Action is extremely light on details for interacting with the
cxf component, I wonder if anyone here has any practical advice on how to
set up routes where the operations are all from the same wsdl file? For
example I've had to make the same web service available on multiple ports
(declared multiple cxf:beans) just so that I could associate unique routes
to each operation, which doesn't feel like the right solution.



--
View this message in context: http://camel.465427.n5.nabble.com/Chaining-web-service-calls-in-a-route-tp5786218p5786244.html
Sent from the Camel - Users mailing list archive at Nabble.com.