L.S.,
If you're new to ServiceMix, I would recommend you not to start with the JBI approach (xbean.xml, http:endpoint, ...) but to deploy Camel routes directly onto the container. The quickstart guide at http://servicemix.apache.org/docs/4.3.0-SNAPSHOT/quickstart/index.htmlshould give you an idea about how that would work. For your particular use case, you could use the http://camel.apache.org/cxf.html or the http://camel.apache.org/http.htmland http://camel.apache.org/jetty.html components to receive HTTP requests and afterwards call out to the external web service. You can find some more background information about using Camel in ServiceMix and how-to install the addtional components you need in http://servicemix.apache.org/docs/4.3.0-SNAPSHOT/users-guide/camel/index.html . (These two documentation links are part of our new work-in-progress set of user guides, so we would also welcome any feedback to make these things as clear as possible for new users) Regards, Gert Vanthienen ------------------------ FuseSource Web: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On Thu, Dec 1, 2011 at 12:48 PM, Stephane <[email protected]>wrote: > Hello, > > I'm a newbie in ServiceMix and I'm trying to call an external Web Service > from ServiceMix. I read a lot of post and I can't configure my xbean.xml > and > my camel-context.xml for call the external web service. > > So, my entry point is a HTTP Consumer. From this point, I want to call an > external Web Service. > > I have configured a cxfbc like this : > > <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" > xmlns:dataExchange=" > http://webServices.web.squirel.horoquartz.amano.com/"> > > <import resource="classpath:META-INF/cxf/cxf.xml" /> > <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" /> > <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> > <import > resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" /> > <import > resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" /> > > <cxfbc:provider > wsdl="http://localhost:8080/EasyID/services/HQCloudWebService?wsdl" > service="dataExchange:HQCloudWebServiceService" > endpoint="applicationConsCxf"> > </cxfbc:provider> > </beans> > > When my HTTP Consumer has my cxfbc for target, I have the error : Premature > end of file > > After, I try to do something like this : > > HTTP Consumer -> Camel Router -> Cxfbc > > If I do that, my error is No endpoint, service or interface name specified > for routing > My route is > > <route> > <convertBodyTo type="java.lang.String"/> > <from > uri="jbi:endpoint:http://servicemix.apache.org/router/DataExchange/call4 > "/> > <to > uri="jbi:service: > http://webServices.web.squirel.horoquartz.amano.com/HQCloudWebServiceService > "/> > </route> > > After, I try to use cxf endpoint from Camel with a route like this : > > <route> > <convertBodyTo type="java.lang.String"/> > <from > uri="jbi:endpoint:http://servicemix.apache.org/router/DataExchange/call3 > "/> > <to uri="cxf:bean:customerService"/> > </route> > > But I get the error No component found with scheme: cxf > If i had these imports, I have the same error > > <import resource="classpath:META-INF/cxf/cxf.xml" /> > <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" /> > <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> > <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" /> > > Also, I try to make a Camel bean which call my external Web Service, but I > have the error : > > No conduit initiator was found for the namespace > http://schemas.xmlsoap.org/soap/http > > So, what is my problem, because I don't understand how can I call a > external > Web Service and what is the good solution. > > Thanks for your help > > Stephane > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Call-an-external-Web-Service-in-apache-servicemix-4-3-0-fuse-00-00-tp5038418p5038418.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. >
