Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

bahaaldine
2011-06-15 09:38:15

That's what I was looking for smile

Thank you Hadrian !
Bahaaldine

hzbarcea
2011-06-14 00:44:58

Since you mentioned SOAPAction explicitly, Camel also propagates the cxf Header.HEADER_LIST and SoapBindingContstants.SOAP_ACTION headers, so that should be available as well.

hzbarcea
2011-06-14 00:24:11

Hi,

Looks like you're implementing a service with multiple operations. So what you are asking, I think, is what is the differentiator that would tell you on a route what operation was invoked. The answer to that is a header called "operationName".

The easiest way to implement what you want would be using a content based router or, in a bit more elegant way, using a recipient list using one route/endpoint per operation, kinda like below (assuming your wsdl contract has operations named "myOperation1" and "myOperation2"):

Code:

from("cxf:bean:CXFTESBRouteService")
  .to("log:test")
  .recipientList(simple("direct:${header.operationName}"));

from("direct:myOperation1").whatever-needs-to-be-done-for-myOperation1();
from("direct:myOperation2").whatever-needs-to-be-done-for-myOperation2();
[...]

You can see an example of the above in action in the camel-example-cxf-tomcat shipped with the distribution.

I hope this helps.

bahaaldine
2011-06-13 09:51:18

Hi,

I want to add a new operation to the WSDL of a Camel route exposed as a web service with CXF,
and a specific route for this operation.

What I don't know is how I can differentiate request to execute the right route...
Do I have to implement a CXF SOAPAction interceptor ? Is there a native mechanism in Camel to do that ?

That's how I've declared my CXF Endpoint :

Code:

<cxf:cxfEndpoint id="CXFTESBRouteService" 
        address="/WSRouteService"
        serviceClass="com.talend.demo.ws_routeservice.WSRouteService"
        wsdlURL="classpath:WEB-INF/WS_TalendESBDemo.wsdl" />

That's my (very simple) route :

Code:

from("cxf:bean:CXFTESBRouteService").to("log:test");

Thanks !

Board footer

Powered by FluxBB