It depends on how generic the route could be.
If you just have one SEI, you can use it to setup the route for cxfEndpoint.
If you have bunch of SEIs, then you may consider to use WebServiceProvider API, then you can route the SOAP message that you want.
You can find more information about it here
The idea is to have a cxfEndpoint that routes messages to other cxfEndpoints. So there will be multiple SEIs.
I tried out that link and it works using @WebServiceProvider(). However, when I try and route to another cxfEndpoint I get the following fault:
for RouterService#invoke has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: BindingOperationInfo must be specified
Any ideas how to fix this would be appreciated!
Oh, you want route the request to another CXF Endpoint which has different SEI.
The WebServiceProvider can't help you as current camel-cxf doesn't provide Dispatch API for you to use.
BTW, did you do some transformation on the incoming SOAP message ?
Maybe you can consider to use Camel-Jetty Component to take the SOAP request and do some transformation then route it to another endpoint.
Is there any way to transform the message after the first cxfEndpoint to add the BindingOperationInfo? This is the ultimate problem I am facing now.
I tried using Jetty and there are two problems:
1. The request goes through, the message is routing, beautiful! However...the response header from Jetty seems to be unable to exceed 4k bytes:
2. My co-workers seem to feel that Jetty is not integrated enough into FUSE ESB. They want me to focus on cxf webservices, not web servers.
I am doing a "transformation" to the message, but nothing more than simple routing in-between a bean.
Thank you SO much for your help so far
Edited by: rkozura on Aug 30, 2010 1:59 AM
Which smx/camel version are you using?
I believe response header from Jetty exceed 4k issue has already been fixed, CAMEL-2566 tracked this issue
The camel version I am using is 2.2.0. So it seems the fixed version is 2.3.0?
My next question is: How do I update camel? There are two version from what I can tell:
1. The "features" version of camel.
2. The version of camel that is inside of my repository.
Unless they are the same
If your FuseESB can download artifacts from internet, I think update the feature file should be fine, but you need to make sure you don't install other version of camel.
Otherwise, you need to put the camel 2.3.0 into your mvn repository.
Just answering your question2.
By using jetty can make you focus on the underlay stream, as you want to provides a generic web service proxy. You just need to transform the request to what you want, it could be easy if you are using the camel-xslt component, and CXF will not help you more unless you have some advance WS* requirement such WS addressing etc.