2 Replies Latest reply on Dec 14, 2009 9:57 AM by lyfe

    using EIP with CXF clients and providers

    lyfe

      I'm trying to use content based routing to route a request to the proper endpoint.  I've seen examples of using Camel (from().to()) but not using EIP patterns.

       

      Here's my scenario:

       

      I want a client that calls a CXF web service that accept SOAP msgs.  The CXF is deployed in the ESB.  I want to take the request and route it to the proper external web service...then route the response back.

       

      An example would be:

       

      If I receive the following

       

       

       

      I want my CXF to pass the body to a camel route like

       

      from("jbi:endpoint:soap-message-listener").choice().when().method().to("jbi:endpoint:order-service-framework").

                            .when().method().to("jbi:endpoint:order-camel"). ... end();

       

      The reason for the JBI endpoint references is that I have a route now that works with SOAP/HTTP (tested via one of the client.html forms included with the examples) and I would like to reuse the same code to handle web service type calls.

       

      I've taken successfully running cxf proxy code and modified it to send to my routing but I get an error about no matching endpoint.  In the error msg, the target service is correct.

       

      SIDENOTE: doing my investigation, http://camel.apache.org/cxf-example.html contains an error format macro msg (Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20)...this error is also on http://cwiki.apache.org/confluence/display/CAMEL/CXF+Example.  I didn't know who to contact so I though I'd put it here