Camel-CXF OSGI ServiceConstructionException: Could not find definition for service

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Camel-CXF OSGI ServiceConstructionException: Could not find definition for service

TERRIEN Jean-Yves
Hello
I have a route

from("jms: ...")
...
to ("cxf://http ....")
...

I've generated the code with the WSDL as in the example camel-example-cxf-blueprint
I've wrote a JUNIT test with CamelTestSupport
and it works
my route builder produces the desired route and the call works correctly.
my problem comes with deployment in Karaf (smx)

Unable to start blueprint container for bundle ng523-copilote-out
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean ng523-copilote-out
Caused by: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[cxf://http://localhost:8088/mockws_traca?dataFormat=MESSAGE&defaultOperationName=MajTracaDMI&serviceClass=localhost.ws_traca.wsdl.WsTracaSoapPort&wsdlURL=WsTraca.wsdl]. Reason: org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://localhost/ws_traca/wsdl/}WsTracaSoapPortService.
...
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://localhost/ws_traca/wsdl/}WsTracaSoapPortService.


I've open WsTracaSoapPort.java générated file.
and I'm read
@WebService(targetNamespace = "http://localhost/ws_traca/wsdl/", name = "WsTracaSoapPort")
 With JUNIT the url
cxf://http://localhost:8088/mockws_traca?dataFormat=MESSAGE&defaultOperationName=MajTracaDMI&serviceClass=localhost.ws_traca.wsdl.WsTracaSoapPort&wsdlURL=WsTraca.wsdl Is ok. It find the service WsTracaSoapPort
I dont't understand why in SMX it search WsTracaSoapPortService not WsTracaSoapPort.

I've added ServiceName Option
cxf://http://localhost:8088/mockws_traca?dataFormat=MESSAGE&defaultOperationName=MajTracaDMI&serviceClass=localhost.ws_traca.wsdl.WsTracaSoapPort&wsdlURL=WsTraca.wsdl&serviceName={http://localhost/ws_traca/wsdl/}WsTracaSoapPort

But is a same result.

Is an constraints for me I'm running an older version of camel 2.8.1

can you help me

thank
JYT