-
1. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
sergeyb_deleteusersergeyb Jun 25, 2009 12:29 PM (in response to crankydillo)Hi,
Not sure why the http transport id is picked up - you may want to try using
JAXRSClientFactoryBean directly for creating a WebClient and set transportId to
"http://cxf.apache.org/bindings/xformat".
Which may or may not fix it, probably not.
The next step is to try to set a ConduitInitiator explicitly, before creating a client :
ConduitInitiatorManager conduitInitiatorMgr =
bus.getExtension(ConduitInitiatorManager.class);
conduitInitiatorMgr.registerConduitInitiator(transportId, new JettyHTTPTransportFactoryConduitInitiator());
I'm not sure it is the right approach though - for some reasons factories are nor registered.
Should you import
?
give it a try please. May be just adding these 2 imports would do the trick
cheers, Sergey
Edited by: sergeyb on Jun 25, 2009 4:29 PM
-
2. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
crankydillo Jun 25, 2009 1:19 PM (in response to sergeyb_deleteusersergeyb)The following appears to work:
Bus bus = BusFactory.getDefaultBus();
BindingFactoryManager mgr = bus.getExtension(BindingFactoryManager.class);
mgr.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, new JAXRSBindingFactory());
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
//bean.setTransportId("http://cxf.apache.org/bindings/xformat");
bean.setAddress(url);
I tried adding those lines to my beans.xml, but it didn't help.
-
3. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
sergeyb_deleteusersergeyb Jun 25, 2009 1:26 PM (in response to crankydillo)So just replacing a WebClient factory creation code with the explicit use of JAXRSClientFactoryBean made the difference ?
thanks, Sergey
-
4. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
crankydillo Jun 25, 2009 1:51 PM (in response to sergeyb_deleteusersergeyb)heh, I just came here to edit my reply. I'm not sure what happened, but I'm once again getting the "No conduit initiator was found for the namespace http://schemas.xmlsoap.org/wsdl/soap/http." message.
AFAIK, I didn't do anything besides reinstall my bundle and stop/stop servicemix.
Btw, where is JettyHTTPTransportFactoryConduitInitiator found?
Edited by: crankydillo on Jun 25, 2009 5:50 PM
-
5. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
sergeyb_deleteusersergeyb Jun 25, 2009 4:25 PM (in response to crankydillo)JettyHTTPTransportFactoryConduitInitiator
it is JettyHTTPTransportFactory which implements ConduitInitiator. Can you try registering it...
Please open a JIRA if you feel it's going nowhere as at the moment I'm not sure why it's not working...Please attach sample bundles and describe the case and we will look into it..Please post a link here if you open it
thanks, Sergey
-
6. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
crankydillo Jun 26, 2009 8:45 AM (in response to crankydillo)I switched from WebClient to Apache's HTTPClient. This is just one small piece of the problem I'm trying to solve so I can't spend a lot of time on it now.
Thanks for your help.
-
7. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
sergeyb_deleteusersergeyb Jun 26, 2009 9:25 AM (in response to crankydillo)I've created this JIRA :
https://issues.apache.org/activemq/browse/SMX4-311
Please add more info to it whenever you get a chance
thanks, Sergey
-
8. Re: Using Apache CXF's WebClient in JBI (Fuse ESB 4.1.0)
sergeyb_deleteusersergeyb Oct 9, 2009 5:11 AM (in response to sergeyb_deleteusersergeyb)This issue has been fixed in CXF, fix should be available in the next fuse release.
Temp workaround is to explicitly register a ClientOnlyHTTPTransportFactory with ClientInitiatorManager bus extension...