creating a client in camel for existing web service.

One Star

creating a client in camel for existing web service.

I looked through the examples in the package, but none of them seem to show what I want to do.
I have an existing SOAP HTTP service running on TomEE. Regular SOAP clients work fine with this service.
I want to find the easiest way in camel to call operations on this service, in a route.
I'm using Java DSL, not the ESB Studio app.
I am trying to use an example I found online, using SoapJaxbDataFormat
but am getting this error:
Exception in thread "SpringOsgiExtenderThread-18" org.apache.camel.RuntimeCamelException: javax.xml.bind.JAXBException: "org.xmlsoap.schemas.soap.envelope" doesnt contain ObjectFactory.class or jaxb.index
MY SEI:
com.cn.dsa.wsdl.JobControlSoapWs
OPERATION:
The operation I'm testing with doesn't require any params, it just gets a list of current JobControl objects. But there are other operations which require params which I need to learn how to call also. Are these params just added to the Header also??
My stubs are all in there and include the ObjectFactory class. but not jaxb.index.

MY ROUTE:
String WS_URI = "cxf://http://localhost:8081/SfJobControlSoap/webservices/JobControlSoap?serviceClass=com.cn.dsa.wsdl.JobControlSoapWs&dataFormat=MESSAGE";

SoapJaxbDataFormat soapDF = new SoapJaxbDataFormat("com.cn.dsa.wsdl", new ServiceInterfaceStrategy(JobControlSoapWs.class,true));

from("jetty:http://0.0.0.0:8181/sftest/getjobcontrols")
.setHeader("operationName", constant("getSfJobControls"))
.onException(Exception.class)
.handled(true)
.unmarshal(soapDF)
.end()
.marshal(soapDF)
.to(WS_URI)
.unmarshal(soapDF);
my spring config file:
<bean id="sfTestRoute" class="com.cn.dsa.sf.SfTestRouteBuilder">
</bean>
<camelContext id="sprtest" xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="sfTestRoute"/>
</camelContext>
Does anyone have a solution to this, or better yet, a working example of calling a web service from a route using cxf.
One Star

Re: creating a client in camel for existing web service.

Have you imported the package org.xmlsoap.schemas.soap.envelope in the maven-bundle-plugin configuration ?