Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C0AB9F9C for ; Fri, 30 Mar 2012 17:05:28 +0000 (UTC) Received: (qmail 1168 invoked by uid 500); 30 Mar 2012 17:05:28 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 1108 invoked by uid 500); 30 Mar 2012 17:05:28 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 1065 invoked by uid 99); 30 Mar 2012 17:05:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2012 17:05:26 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christian.mueller@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qa0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2012 17:05:21 +0000 Received: by qadb15 with SMTP id b15so738176qad.2 for ; Fri, 30 Mar 2012 10:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=LRN9sHgRlQx3BMBMkSgxo9uzFpoIoPnt8kSwfIu87Hw=; b=VnWT2yIqsQuufe2QRX8QJ5Mfe0vLOLR8nr+hxAMMxukAVZw9KEw9TXGMfH0/JtbwfQ mUWaSMR0gyYqc0KaqMt5bvGyjprg2hdsD87znffSH4cxOCS7+yYR1if094WplUbsq+DG eytSgzDwkn0OWyaBMgEDaZCeJEX1hVez3ys98H7AcitK1apV+7oL3SdwUvP+Z3ehQkRt Du3lVrz1VpiQZ+BRWmISL0QXO9Y2YOaMAEra9Fa4SDKo60dWekj8yiXTcZQH4VqsXnSH ErVq+psZcogdkMEGb9XWaxAwg7E88edEYrLwVd7Xt/UWA861D+GO12eIExqxvPCDhOBa QYEg== MIME-Version: 1.0 Received: by 10.229.136.131 with SMTP id r3mr1138938qct.129.1333127100907; Fri, 30 Mar 2012 10:05:00 -0700 (PDT) Received: by 10.229.75.71 with HTTP; Fri, 30 Mar 2012 10:05:00 -0700 (PDT) In-Reply-To: <1333114941000-5606712.post@n5.nabble.com> References: <1333114941000-5606712.post@n5.nabble.com> Date: Fri, 30 Mar 2012 19:05:00 +0200 Message-ID: Subject: Re: defaultEndpoint must be specified with seda request/reply From: =?ISO-8859-1?Q?Christian_M=FCller?= To: users@camel.apache.org Content-Type: multipart/alternative; boundary=00248c768f9e4a40a404bc78d76f X-Virus-Checked: Checked by ClamAV on apache.org --00248c768f9e4a40a404bc78d76f Content-Type: text/plain; charset=ISO-8859-1 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 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. > --00248c768f9e4a40a404bc78d76f--