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 <[email protected]> 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: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to