If you look at the JavaDoc, you will see that:
template.requestBody("seda:backend");
will send the String "seda:backend" to the default Endpoint which you
didn't specify.
You have to possible solutions:
1) set the default endpoint:
createProducerTemplate.setDefaultEndpointUri("seda:backend")
2) provide the endpoint in the requestBody method
template.requestBody("seda:backend", "body");
Best,
Christian
On Fri, Mar 30, 2012 at 3:42 PM, unludo <[email protected]> wrote:
> When running this program I get the message 'defaultEndpoint must be
> specified'. Could you help me understand why?
> Thank you!
>
> public static void main(String args[]) throws Exception
> {
> // create CamelContext
> CamelContext context = new DefaultCamelContext();
>
> // add our route to the CamelContext
> context.addRoutes(new RouteBuilder()
> {
> public void configure()
> {
>
> from("seda:backend").inOut("http4://
> 10.11.144.78:8080/pvaa-backend/rest/v1/users/json");
> }
> }
>
> );
>
> // start the route and let it do its work
> context.start();
> ProducerTemplate template = context.createProducerTemplate();
>
> Object result = template.requestBody("seda:backend");
>
> Thread.sleep(30000);
>
> context.stop();
> }
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/defaultEndpoint-must-be-specified-with-seda-request-reply-tp5606712p5606712.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>