I think the values you are setting for the serviceName and endpointName properties are wrong. These are QNames formated in form "{nsuri}lcname", where nsuri is the namespace uri and lcname the local name.
So if the namespace-uri is "http://axisversion.sample" and the local name is "Version", the property value should look like "{http://axisversion.sample}Version" and not "http://axisversion.sample/Version". 2014-11-06 9:53 GMT+01:00 Royamit <amitroy...@gmail.com>: > Hi all, > > I am trying to create a proxy service which invokes axis2 version web > service. > But while trying so, i am encountering error which is related to namespace > issue. > > My camel proxy configure method is : > > @Override > public void configure() throws Exception { > > String cxfEndpointAddress = > "cxf://http://localhost:9081/camel-example-cxf-proxy/webservices/versionWS?"; > String namespace="http://axisversion.sample"; > String cxfEndpoint = cxfEndpointAddress > + "endpointName="+namespace+"/VersionHttpSoap11Endpoint " > + "&serviceName="+namespace+"/Version " > + "&wsdlURL=etc/versionAdapter.wsdl" > + "&dataFormat=MESSAGE"; > > System.out.println("The cxf Endpoint formed is : "+ > cxfEndpoint); > > String > callRealWebService="http://localhost:8080/axis2/services/Version?throwExceptionOnFailure=false"; > > System.out.println("Real web service is : " + > callRealWebService); > > > from(cxfEndpoint).to("log:input").removeHeader("pattern=CamelHttp*").to(callRealWebService).to("log:output"); > > > } > > But while running this code i get the following error: > Exception in thread "main" > org.apache.cxf.service.factory.ServiceConstructionException: Could not find > definition for service http://axisversion.sample/Version . > at > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:158) > at > org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:405) > at > org.apache.camel.component.cxf.WSDLServiceFactoryBean.buildServiceFromWSDL(WSDLServiceFactoryBean.java:102) > at > org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525) > at > org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261) > at > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215) > at > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) > at > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) > at > org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) > at > org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:262) > at > org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:242) > at > org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65) > at > org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80) > at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134) > at > org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2379) > at > org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2309) > at > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2091) > at > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1951) > at > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1777) > at > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) > at > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1745) > at > org.apache.camel.example.version.VersionRoutes.main(VersionRoutes.java:14) > > How can i fix the namespace issue? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problem-configuring-route-tp5758581.html > Sent from the Camel - Users mailing list archive at Nabble.com.