Reputation: 97
I'm trying to call a WS (SOAP/HTTP) using apache camel.
Let's say WSDL is located at
http://localhost:8080/TestWS/services/TestWS?wsdl.
I read http://camel.apache.org/cxf.html and some tutorials. But there the WSDLs are always local files (eg: file://local/wsdl/hello.wsdl).
Is there a way to reference a WSDL lying on a Tomcat for example?
I tried different things like
from("direct:in").setBody(this.body()).to("cxf:http://localhost:8080/TestW/services/TestWS?wsdlURL=http://localhost:8080/TestW/services/TestWS?wsdl")
but it's not working.
Any help would be very much appreciated.
Upvotes: 1
Views: 2855
Reputation: 22279
I'm not sure why you need the WSDL at runtime when invoking a web service? Is it for validation of your message?
You can achieve the very same thig without even knowing about the WSDL in advance using Spring WS. You need to construct a valid request though.
from("direct:start").to("spring-ws:http://localhost:8080/TestW/services/TestWS");
Upvotes: 2