camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: spring-ws component 2.15.2
Date Fri, 15 May 2015 07:35:30 GMT
Hi

The configure method of RouteBuilder is only for setting up the Camel
routes. All the code with the producer template et all should be done
someplace else.
http://camel.apache.org/walk-through-an-example.html

On Thu, May 14, 2015 at 4:34 PM, Nick Bryan <nick@unit3d.tv> wrote:
> Hi,
> Trying to use spring-ws as a web service client and set up the following very simple
route based on the component doc
>
> public void configure() {
>
>     String dataRequest = "<ns1:GetWeather xmlns:ns1='http://www.webservicex.com'>"
+
>             "  <ns1:CityName>London</ns1:CityName>" +
>             "  <ns1:CountryName>England</ns1:CountryName>" +
>             "</ns1:GetWeather>";
>
>     ProducerTemplate template = getContext().createProducerTemplate();
>
>     from("direct:example")
>             .to("spring-ws:http://www.webservicex.com/globalweather.asmx");
>
>     template.requestBody("direct:example", dataRequest);
> }
>
> When I run it I'm getting the error -  No consumers available on endpoint: Endpoint[direct://example]
>
> Any pointers as to what I'm doing wrong?
> Thanks
> Nick



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message