-
1. Re: Simple SOAP/HTTP invocation with Camel
davsclaus Mar 10, 2010 11:08 AM (in response to renaud.denis)Hi
Check out the Camel CXF async example
http://camel.apache.org/cxf-async-example.html
The source is here
https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-cxf-async/
Don't mind the async thing. But its expose a CXF webservice using Camel and has a client calling it etc. Its wsdl2java based.
-
2. Re: Simple SOAP/HTTP invocation with Camel
renaud.denis Mar 10, 2010 12:13 PM (in response to davsclaus)Thank you for the quick answer.
What I don't get here is the need to use a Java interface, or any code generation tool to do a request on the web service, since I don't need any marshalling from/to Java.
The snippet I'm referring to is:
<cxf:cxfEndpoint id="reportIncidentEndpoint" address="http://localhost:9000/ReportIncident/service" serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"/>
In my case, my original service is a Jax-WS annotated CXF service using an XMLBeans document as the argument of the operation, but I'd like to avoid depending on the client stubs within the camel bundle (and all the CXF/Jax-WS/Xmlbeans dependencies it rely on).
I would like to perform the query on the service (it could also be a service I didn't write like an amazon service) using pure XML message produced by my camel route.
-
3. Re: Simple SOAP/HTTP invocation with Camel
davsclaus Mar 10, 2010 12:20 PM (in response to renaud.denis)You want to send a SOAP in a kind of generic / raw style?
Something like camel-soap?
-
4. Re: Simple SOAP/HTTP invocation with Camel
renaud.denis Mar 10, 2010 12:30 PM (in response to davsclaus)Looks exactly what I'm looking for, but I'm surprised not to see such a component in Camel out-of-the-box.
I can also see a SOAP dataformat, available starting from Camel 2.3 (after all, this is about message transformation); but still need an interface apparently.
Any idea why this doesn't come with Camel? Maybe with the http component? Is this an unusual way to request on web services from an ESB?
Thanks a lot, I'll come back on this thread after testing this component.
Renaud
-
5. Re: Simple SOAP/HTTP invocation with Camel
davsclaus Mar 10, 2010 2:05 PM (in response to renaud.denis)Yeah you can use raw http as well.
Well I would love to include camel-soap at Apache but I haven't checked which 3rd party dependencies it uses. Not all is Apache friendly and thus maybe not possible to include.
-
6. Re: Simple SOAP/HTTP invocation with Camel
renaud.denis Mar 11, 2010 3:17 AM (in response to davsclaus)Yeah you can use raw http as well.
Then how do you do the transformation into a soap request? Using xsl?
-
7. Re: Simple SOAP/HTTP invocation with Camel
njiang Mar 11, 2010 9:19 PM (in response to renaud.denis)Yes, xslt can do that kind of job.
But if you can choice the implementation of the server side , you can try to use the REST which can give your more flexibility with the camel-http component.