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 C87F19DB1 for ; Tue, 24 Jul 2012 14:01:20 +0000 (UTC) Received: (qmail 88036 invoked by uid 500); 24 Jul 2012 14:01:20 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 87446 invoked by uid 500); 24 Jul 2012 14:01:19 -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 87428 invoked by uid 99); 24 Jul 2012 14:01:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 14:01:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sberyozkin@gmail.com designates 209.85.215.45 as permitted sender) Received: from [209.85.215.45] (HELO mail-lpp01m010-f45.google.com) (209.85.215.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 14:01:13 +0000 Received: by lahc1 with SMTP id c1so1075400lah.32 for ; Tue, 24 Jul 2012 07:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=CzY5j9UHZlRY4rj3gqIAIS7DNCaMYHnxGiUIHOmg+Ho=; b=vW8NCAeKw2Ai/Kv2bqfR1hvXsHrFYPJ/uPwWcq6SiWUXGOfHJasYJ+oypXi04QxrtT trILieSkmhypLoMITIBzaftNjyxNquz6KhHGokhRZu6H71EA73mkn2jQw4i30cFLV2zi gQITbG6sCAqQo3gHz9gWlLcdi+cyAjrx/uk6HWxFPZtILIL6zbM3JUgWRY/SNUEPp4IA 5gBULVwmGd/rMXTmkwU4j2KJfHDmCauqaSAQw1QAUP/XtGDa2feUK2ntY9mC4RFNH1Hq KcHJNSiJMdBkqzjRskRE4esmCZKIqHRVrF7UMEdVOcMlnWxDULcqC6Y4zrPKxixrZP4H XNvw== Received: by 10.152.108.144 with SMTP id hk16mr21661708lab.2.1343138451346; Tue, 24 Jul 2012 07:00:51 -0700 (PDT) Received: from [192.168.2.3] ([89.100.190.79]) by mx.google.com with ESMTPS id gi19sm16754743lab.16.2012.07.24.07.00.49 (version=SSLv3 cipher=OTHER); Tue, 24 Jul 2012 07:00:51 -0700 (PDT) Message-ID: <500EAA90.3050305@gmail.com> Date: Tue, 24 Jul 2012 15:00:48 +0100 From: Sergey Beryozkin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: users@camel.apache.org CC: bitter geek Subject: Re: Rest client References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi On 24/07/12 14:52, bitter geek wrote: > Hi All, > > I'm a bit confused with the sample code for creating rest endpoint. > > I do not have access to the rest service class but only want to create > a rest endpoint to use with camel. > > Do I only need to create rsClient tag? If so, what class do I put > there for serviceClass? Why does it need a serviceClass if this > endpoint is just used to make an http request? > I believe this option is there to make a proxy based invocation, for the produce/consumes types be derived from specific operations available on the service class. However, the cxf rs producer is not thread safe right now. So I'd recommend you try one of the other Camel HTTP components which can make outbound calls till we get it fixed (http, jetty, etc - I'm assuming they are thread-safe on the client side), or please experiment with embedding direct thread-safe cxf jaxrs/web client references into the root Sergey > In addition, how do I get hold of this endpoint in Java? > > Thanks a lot for your help! > > Bing > > ///////////////////////////////////////////////////// > > address="http://localhost:${CXFTestSupport.port1}/CxfRsRouterTest/route" > serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService" > loggingFeatureEnabled="true" loggingSizeLimit="20"/> > > > address="http://localhost:${CXFTestSupport.port2}/CxfRsRouterTest/rest" > serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService" > loggingFeatureEnabled="true" /> -- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com