You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "mr.pohl" <mr...@seznam.cz> on 2012/11/01 09:32:40 UTC
Call web service from Camel
I would like to call web service from Camel. But I receive null everytime I
call the service. Could you please help me finding a solution?
The service is running on tomcat and I can test it with soapUI. Here is the
request from SoapUI.
and the response returns Hello Pavel. I followed the CamelInAction guide
with creating contract first web service. I am able to run the route which
reads a file and send it to web service.
The code of the route is the following.
The FileProcessor class looks like this:
In next version I would like to generate a request through the objects
generated by cxf-codegen-plugin (HalloWorld.java, HelloWorldImpl.java,
HelloWorldRequest.java, HelloWorldResponse.java, HelloWorldService.java,
ObjectFactory.java, package-info.java).
In the camel-cxf.xml I have:
To read response from the web service I am using this route.
The last route gets data from seda...
...and prints the result.
The output from the execution is: Data received: null
I would expect some XML file which I could parse with cxf objects. Could you
please help me finding the problem?
Thank you
Pavel
--
View this message in context: http://camel.465427.n5.nabble.com/Call-web-service-from-Camel-tp5721952.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Call web service from Camel
Posted by "mr.pohl" <mr...@seznam.cz>.
Thank you for a hint. It kicks me forward ;)
The problems with this example are in classes FileProcessor and PrintResult.
I have also simplified the example, so I'am using only one route
FileToWsRoute for now.
The FileProcessor has changed to this.
The PrintProcessor has changed to this.
I think this is a good example for others who struggles with camel and web
services.
--
View this message in context: http://camel.465427.n5.nabble.com/Call-web-service-from-Camel-tp5721952p5722028.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Call web service from Camel
Posted by "Willem.Jiang" <wi...@gmail.com>.
Hi,
>From the routes those you showed us, I can see you need go through the
camel-cxf wiki[1].
It shows you how to consume or produce the message through the camel-cxf
component.
[1]http://camel.apache.org/cxf.html
Willem
--
View this message in context: http://camel.465427.n5.nabble.com/Call-web-service-from-Camel-tp5721952p5721954.html
Sent from the Camel - Users mailing list archive at Nabble.com.