Hi, It looks like you are deploying the camel route into OSGi container? The warning means there are more than on javax.xml.ws.WebServiceProvider classes are loaded by deferent Classloader. Are you using Karaf or ServiceMix?
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Saturday, May 11, 2013 at 6:21 PM, Smith-John wrote: > Hi, > > my route now looks like this: > from("cxf:http://localhost:8050/service?dataFormat=PAYLOAD")... > (PAYLOAD mode without wsdl and serviceClass). > > But with this I get a NullPointer exception where I add the route to the > CamelContext (camelContext.addRoutes(new GenericSOAPRoute());). > > Don't know if it helps, but LOG says: > > 12:08:27.575 DEBUG o.a.c.core.osgi.OsgiDefaultCamelContext:1985 Warming > up route id: route3 having autoStartup=true > 12:08:27.575 TRACE org.apache.camel.support.ServiceSupport:54 Service > already started > 12:08:27.575 DEBUG org.apache.camel.impl.RouteService:129 Starting > services on route: route3 > 12:08:27.591 DEBUG o.apache.camel.component.cxf.CxfEndpoint:279 Ignore > DataFormat mode PAYLOAD since SEI class is annotated with WebServiceProvider > 12:08:27.591 DEBUG o.apache.camel.component.cxf.CxfEndpoint:307 > ServerFactoryBean: org.apache.cxf.jaxws.JaxWsServerFactoryBean@1a0283e added > properties: {} > 12:08:27.607 DEBUG o.apache.camel.component.cxf.CxfEndpoint:740 Using > DefaultBus org.apache.cxf.bus.extension.ExtensionManagerBus@eeabe8 > 11.05.2013 12:08:27 org.apache.cxf.jaxws.support.JaxWsImplementorInfo > getWebServiceProviderAnnotation > WARNUNG: The javax.xml.ws.WebServiceProvider annotation was already loaded > by another classloader. Please check if there are multiple versions of the > web service annotation jar in your classpath. > 12:08:27.622 INFO o.a.c.core.osgi.OsgiDefaultCamelContext:1590 Apache > Camel 2.10.4 (CamelContext: 101-camel-6) is shutting down > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:111 Stopping > service org.apache.camel.impl.RouteService@16c14c0 > 12:08:27.622 TRACE o.a.c.m.DefaultManagementLifecycleStrategy:541 The > route is not managed: > EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > -> > Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]] > 12:08:27.622 DEBUG org.apache.camel.impl.RouteService:197 Stopping > services on route: route3 > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:111 Stopping > service > EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > -> > Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]] > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:186 Shutting > down service: > EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > -> > Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]] > 12:08:27.622 TRACE org.apache.camel.support.ServiceSupport:82 Service > already stopped > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:163 Shutting > down service org.apache.camel.impl.RouteService@16c14c0 > 12:08:27.622 DEBUG org.apache.camel.impl.RouteService:240 Shutting > down services on route: route3 > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:106 Service > already stopped: > EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > -> > Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]] > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:186 Shutting > down service: > EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > -> > Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]] > 12:08:27.622 TRACE org.apache.camel.support.ServiceSupport:149 Service > already shut down > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:111 Stopping > service Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:186 Shutting > down service: > Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > 12:08:27.622 TRACE org.apache.camel.support.ServiceSupport:82 Service > already stopped > 12:08:27.622 TRACE o.a.c.m.DefaultManagementLifecycleStrategy:541 The > route is not managed: > EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD] > -> > Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]] > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732332.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).