Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F06317594 for ; Thu, 18 Jun 2015 18:24:26 +0000 (UTC) Received: (qmail 46689 invoked by uid 500); 18 Jun 2015 18:24:25 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 46626 invoked by uid 500); 18 Jun 2015 18:24:25 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Delivered-To: moderator for dev@cxf.apache.org Received: (qmail 30902 invoked by uid 99); 18 Jun 2015 18:17:14 -0000 X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.792 X-Spam-Level: * X-Spam-Status: No, score=1.792 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-1.108, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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=nK/ABLZvfEnYAYcqjy1SQCK0tqqJCBLMp5wI5jdW8Ys=; b=ooysnk+sgIeRPvowMgpCWFl1gxyV7GES0xV/ZR+4QmziNVyoa0POg9CAflth8+qXN6 8w1c9XXFNpyHdyQbe8YI025Q3KfIoaj+TAFeIZLxMyAvFdQacJ9TkqpsoZTaqu5YvEXA yARHE+gO6cvplMMttWTCHvqnFnzZqyAk6OXdh3r7bcF8/tqgGHWEfwS/auouuiv6VoyZ SqUY/hwcugqk5Ypm+rrq+BvC5HdHQWNDDxst0jCl8c0hzCpGB5WzoBm5Yy3rUcf/hMsH lfc6OBCnJsJW5ObPrYjXpkJNMVHAfjMEy1lhtuELh/HyFEPay69qHX3nyf9Z9uhKJEKX OQFA== MIME-Version: 1.0 X-Received: by 10.129.110.68 with SMTP id j65mr14971548ywc.86.1434651421548; Thu, 18 Jun 2015 11:17:01 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Jun 2015 11:17:01 -0700 Message-ID: Subject: Re: Apache Camel Routing and Apache CXF Rest with Proxy From: Bhavesh Mistry To: users@camel.apache.org, dev@camel.apache.org, users@cxf.apache.org, dev@cxf.apache.org Content-Type: multipart/alternative; boundary=001a11493e385ba6de0518ced0ac --001a11493e385ba6de0518ced0ac Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I would appreciate if any one has deal with similar issue as above. I would appreciate your input. Thanks, Bhavesh On Tue, Jun 16, 2015 at 11:55 AM, Bhavesh Mistry wrote: > Adding Dev group to see how I can achieve this. > > Thanks, > > Bhavesh > > On Mon, Jun 15, 2015 at 2:56 PM, Bhavesh Mistry < > mistry.p.bhavesh@gmail.com> wrote: > >> Hi All, >> >> >> >> I am new to Apache Camel and trying to solve following problem with >> routing: >> >> >> >> I have CXF JAX-RS based REST Service implemented and deployed in same JV= M >> (end-point). >> >> >> >> I have another set of REST Service that is not within same Java Process >> it is in (python or any other Process but on same host). >> >> >> >> >> >> We have unified port to access both services, for example, >> >> >> >> Client call ----> HTTP Rest call (*8080*) ----- Camel Route( if(=E2=80= =9C/java_api/=E2=80=9D >> ----> to(http://localhost:*9090*) else { to (http://localhost:9091 (OLD >> Services)} >> >> >> >> >> >> > http://localhost:9090/java_api" >> >> loggingFeatureEnabled=3D"true" >> >> serviceClass=3D"=E2=80=A6." > >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> The problem with this approach is there is unnecessary http call for Jav= a >> API(java_api) route since it is already locally hosted and we do not wan= t >> to incur HTTP call. >> >> >> >> This has been done to set-up all the CXF context and be able to server >> REST service. >> >> >> >> So, my questions are: >> >> >> >> 1) 1) Is there any way to setup route to call cxf local binding JAX-RS >> (direct call) rather then http call for Java API ? >> >> 2) 2) How can I configure route such a way so HTTP Proxy headers (e.g *= X-Forwarded-For >> *) gets passed to old Service API ? Since, Java Layer is indeed acting >> as proxy server. >> >> >> Thanks in advance for your help ! >> >> >> Thanks, >> >> >> >> Bhavesh >> >> >> > > --001a11493e385ba6de0518ced0ac--