1 Reply Latest reply on Apr 12, 2010 12:48 AM by Claus Ibsen

    Camel wireTap router with InOut WebService

    Andrew Whelan Newbie

      Hello,

       

      I'm trying to figure out how to use Camel to route the input of a web service call and still have the web service go on its way and complete.

       

      The WireTap Enterprise Integration Pattern works for Mule (sorry if mentioning Mule on here is shamful).

       

      The following allows my web service to complete but I'd also like the input of the web service to be routed to a file.

       

      I'm using the following in my Camel Router

      from("jbi:endpoint:http://purchase_order.srcinc.com/customerService/endpoint?mep=in-out").wireTap("file:C:/EW/webinar/outgoing/customer.out.txt");
      

      The jbi endpoint above is the endpoint of a web service and the web service works for this. I want to write the input (or any part of the web service request) to a file. The WireTap call above doesn't do this. Does anyone have any idea how I can change the above snippet to write the incoming service request to a file and still have the web service call complete??

       

      PS: Just for kicks, following is the mule configuration that actually does what I want. I'd prefer to use ServiceMix/Fuse if I could.

         <model name="PurchaseOrder">
              <service name="CustomerService">
                  <inbound>
                      <cxf:inbound-endpoint address="http://localhost:9090/services/CustomerService"
                                            wsdlLocation="WebContent/WEB-INF/wsdl/CustomerService.wsdl"></cxf:inbound-endpoint>
                  <wire-tap-router>
                      <file:outbound-endpoint path="customer/operation" 
                                        outputPattern="${DATE:yyyy-MM-dd}.dat">             
                          <transformer ref="CustomerToString"></transformer>
                      </file:outbound-endpoint>
                  </wire-tap-router>       
                  </inbound>            
             <component>
              <spring-object bean="CustomerServiceWebService"></spring-object>
            </component>
              </service>
          </model>