On Tue, Nov 24, 2009 at 10:15 AM, lekkie <lekkie.ay...@gmail.com> wrote: > > While trying to configure a route using the camel 2.0, I had the ffg in my > bean.xml file: > > <cxfse:endpoint id="Services" useJBIWrapper="false" useSOAPEnvelope="false"> > <cxfse:pojo> > <bean class="com.services.CollegeServicesImpl"/> > </cxfse:pojo> > </cxfse:endpoint> > > and I have this in my bean class as the annotation > @WebService(targetNamespace = "http://services.com", serviceName = > "Services", portName = "endpoint") > > I thot I'd be able to access this service using the jbi naming convention > from my camelcontext shown below: > > <osgi:camelContext xmlns="http://camel.apache.org/schema/spring"> > <route> > <from uri="jms:queue:RequestQueue" /> > <to > uri="jbi:endpoint:http://services.com/Services/endpoint?mep=in-out" /> > </route> > </osgi:camelContext> > > > I couldn't as it says: > > Camel 2.x-fuse-SNAPSHOT (CamelContext:camelContext) stopped > 15:12:49,403 | ERROR | xtenderThread-72 | OsgiBundleXmlApplicationContext | > gatedExecutionApplicationContext 366 | Post refresh error > org.apache.camel.RuntimeCamelException: > org.apache.camel.FailedToCreateRouteException: Failed to create route route1 > at: >>> To[jbi:endpoint:http://services.com/Services/endpoint?mep=in-out] > <<< in route: Route[[From[jms://queue:RequestQueue]] -> [T... because of > Failed to resolve endpoint: > jbi://endpoint:http://services.com/Services/endpoint?mep=in-out due to: No > component found with scheme: jbi > at > org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039) > at > org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103) > at > org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562) > > I googled and I found out that there is a way to register ur service from > the NMR. > > <jaxws:endpoint id="CollegeServices" > implementor="com.services.CollegeServicesImpl" > address="nmr:CollegeService" /> > > However, my service never got registered as it kept ServiceMix kept saying: > org.springframework.beans.factory.BeanCreationException: Error creating bean > with name 'CollegeServices': Invocation of init method failed; nested > exception is javax.xml.ws.WebServiceException: > java.lang.IllegalStateException: Endpoint address should be a relative URI > wrt to the servlet address (use '/xxx' for example) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
Yeah, I think you need to add the following import to your spring config: <import resource="classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml" /> There's a whole cxf-camel-nmr demo that ships with servicemix 4 that you should take a look at. > > > kr. > -- > View this message in context: > http://old.nabble.com/FailedToCreateRouteException%3A-Failed-to-create-route-route1-tp26497670p26497670.html > Sent from the Camel - Users mailing list archive at Nabble.com. > >