Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Error on using camel cxf "No binding factory... http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

$
0
0
In my camel app i am creating cxf endpoints in java dsl:

CxfEndpoint cxf = new CxfEndpoint(rtdmUrl, new
CxfComponent(this.getContext()));
cxf.setServiceClass(EventPortType.class);
process.process(rtdmSetNameFactory.get(eventName)).to(cxf).process(handleRtdmAnswer);

If try to run this route i get:

Exception in thread "main" org.apache.camel.FailedToCreateProducerException:
Failed to create Producer for endpoint: End
point[http://localhost:8088/mockEventSoapBinding]. Reason:
org.apache.cxf.service.factory.ServiceConstructionException:
Could not resolve a binding for null
...
Caused by: org.apache.cxf.BusException: No binding factory for namespace
http://schemas.xmlsoap.org/soap/ registered.
But if i run main[] from within eclipse (called in a @Test with same
configuration) it is working fine!?

My jar is built with maven-assembly-plugin (executable jar with all
dependencies) I hope/think this is only a configuration problem or is
related to how i set up the cxf endpoint.
I also tried to add a camel-cxf.xml to src/main/resources (like the one from
camel in action but without the endpoint config), no success.

Additional info:
The code above is run in a loop after a "process". The exchange containing
data is created once but this exchange will be processed multiple times
(setting name in exchange object) and then it is sent to same web service
multiple times with different names. (don't ask about this silly web service
design ;-))

Viewing all articles
Browse latest Browse all 5648

Trending Articles