One Star

Job run from camel route

Dear sirs,
this topic is related to
where I cannot expose jobs as services (I don't know what to do with the .KAR file, seems it won't deploy and nobody has answered yet)
So I decided to expose a camel endpoint and call a job from the endpoint (well - still I have no idea how to pass data, but first things first). So I created a simple route. (TOS 5.0)
When the route is started from TOS, it seems running, returns a correct and nice WSDL, published endpoint. but invoking the WS I got response
<faultstring>java.lang.Error: java.lang.Error: java.lang.NoClassDefFoundError: org/talend/webservice/helper/conf/ServiceHelperConfiguration</faultstring>

I found the class in talend-ws,,,jar in TOS, but not in runtime - so seem it is not a way.
of cause I've added camel-tis to dependencies
deploying the route into a runtime I got anyway a not very nice exception
karaf@trun> Failed to create route cCXF_1 at: >>> To <<< in route: Route <<< in route: Route[[Fro
m[cxf://http://localhost:9040/esb/Test1?dataFormat... because of Failed to resol
ve endpoint: talend://demo1.child4_0_1.Child4?context=Default due to: No compone
nt found with scheme: talend
at org.apache.camel.model.RouteDefinition.addRoutes(
at org.apache.camel.model.RouteDefinition.addRoutes(
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelCont
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(Defau
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelCo
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext
at org.apache.camel.impl.ServiceSupport.start(
at org.apache.camel.impl.ServiceSupport.start(
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.j
at demo1.route1_0_1.route1$1CamelImpl.doStart(
at org.apache.camel.impl.ServiceSupport.start(
at org.apache.camel.impl.ServiceSupport.start(
at demo1.route1_0_1.route1.Route(
at demo1.route1_0_1.route1.runJobInTOS(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
at java.util.concurrent.ThreadPoolExecutor$
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve en
dpoint: talend://demo1.child4_0_1.Child4?context=Default due to: No component fo
und with scheme: talend
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelCon
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelCo
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinitio
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRout
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRout
at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.
at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.
at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDef
at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinit
at org.apache.camel.model.RouteDefinition.addRoutes(
... 18 more

my biggest problem is the mentioned thread - I need to expose a job as web service. In TOS 4.2.1 it worked (though I had to stanrd them manually ), but at least it was more intuitive.
Maybe I've just got stucked in past procedures, missed something, but any guidance is welcome Smiley Happy
Kind regards
One Star

Re: Job run from camel route

I think a route is not the solution for your problem.
To create a webservice In TOS for ESB 5.0 you must follow these steps:
- create or import a wsdl in services
- associate a new or existing job to operation defined in your wsdl (this job should contain a tesbresquest and tesbresponse)
- right click on your wsdl under services and export your service to a .kar package
- put your kar file in the deploy folder of your karaf container
- test your service with a client like soap ui, create a project and add wsdl (http://<your endpoint>?wsdl)
from my own experience I put 8040 as port for my service otherwise my service wasn't accessible from other locations
8040 is the default port for osgi http service in TESB 5.0, you can define in the pax web config file of the container
you can follow screencasts from R.Zubairov here
it might help
One Star

Re: Job run from camel route

Hi Ytuzet,
thank you very much, you've helped me a lot Smiley Happy seems I missed the deploy folder.
I still got some errors, but seems the webinars will help me go on.
indeed the route was a desperate try Smiley Tongue
Have a nice weekend
Carpe diem