8 Replies Latest reply on Oct 9, 2009 5:11 AM by deleted user

    Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)

    Samuel Cox Newbie

      Hi,

       

      I wrote an application that uses CXF's WebClient to issue a request to a web service.  I'm trying to wrap this application in a JBI binding component and make it accessible in the ESB.  Everything works except for the WebClient.

       

      First, I got numerous errors about not finding jaxrs namespace when WebClient.createClient(uri) was called.  I tried installing the cxf-osgi feature and putting the following in my service engine's beans.xml:

       

      <!<import resource="classpath:META-INF/cxf/cxf.xml"/>>

           

       

      That didn't seem to do anything.  I got past (maybe...) that issue by putting the following before WebClient.createClient(uri):

       

      Bus bus = BusFactory.getDefaultBus();

              BindingFactoryManager mgr = bus.getExtension(BindingFactoryManager.class);

              mgr.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, new JAXRSBindingFactory());

       

      Now I get an error when client.get() is called.  It is:

       

      org.apache.cxf.interceptor.Fault: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/wsdl/soap/http

       

      Could someone help me out?  Pointers or links would be much appreciated.

       

      Thanks.

       

      Edited by: crankydillo on Jun 25, 2009 1:39 PM