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 B522710915 for ; Wed, 16 Oct 2013 23:04:39 +0000 (UTC) Received: (qmail 35920 invoked by uid 500); 16 Oct 2013 23:04:39 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 35882 invoked by uid 500); 16 Oct 2013 23:04:39 -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 35874 invoked by uid 99); 16 Oct 2013 23:04:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2013 23:04:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christian.posta@gmail.com designates 209.85.215.46 as permitted sender) Received: from [209.85.215.46] (HELO mail-la0-f46.google.com) (209.85.215.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2013 23:04:35 +0000 Received: by mail-la0-f46.google.com with SMTP id eh20so1126862lab.5 for ; Wed, 16 Oct 2013 16:04:14 -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=SWogeo9yTyBicY8c3YClBp8ztRjwZf7suL/FMeceQXA=; b=yKqj+HFV6x8Rw14ZwXnAHr389+QhOlv2AXoCf+NN7j41K50FkdxrkAJEbAhSY05vPL YEQITBb4pq88BDv73oFjOxpKvzYA1tL7KX15RRWgkzHKz3OwSQjz7vDsPgwnlAoUTEzG Zxr/e/JwbmX70ITL+eI/tPMCstlMd/Eh5y0QiboNL9XhexQ4HxxX0gd2BroUi8Y1EdaL AdF8xEF6MOq7QgajjFI2qiq7C4yeEc6ExRF8aGLJb70gXMMLJFUPsFH4vJxQF11dWf6t /bt9a+3u361CQcU1XYtpD9g4z1MHfjohvqKbzKROmrtDLUHzG7OxHlDtbnqd7AFXGU4m UJow== MIME-Version: 1.0 X-Received: by 10.152.120.73 with SMTP id la9mr4393469lab.3.1381964653892; Wed, 16 Oct 2013 16:04:13 -0700 (PDT) Received: by 10.114.2.239 with HTTP; Wed, 16 Oct 2013 16:04:13 -0700 (PDT) In-Reply-To: References: Date: Wed, 16 Oct 2013 16:04:13 -0700 Message-ID: Subject: Re: Creating a Component that Calls Another Component From: Christian Posta To: "users@camel.apache.org" Content-Type: multipart/alternative; boundary=089e011766e5499b2b04e8e3b89b X-Virus-Checked: Checked by ClamAV on apache.org --089e011766e5499b2b04e8e3b89b Content-Type: text/plain; charset=ISO-8859-1 Wonder if there is a better way to share routes that are spread all over your integration by using direct/seda/vm, etc than to try to merge components into one. Maybe you can post a more detailed example with sample routes to illustrate what you're trying to solve? On Wed, Oct 16, 2013 at 2:43 PM, kraythe . wrote: > Greetings, > > I want to create a component that calls another component in essence. > Specifically I have a remote REST based service that I call. I would like > to wrap those calls in a component to reduce the route verbosity we are > faced with. That means that I will need a component to call that service > and do something like the following. > > to("myservice:doStuff?host=www.foo.bar&port=330") > > The issue i am faced with is essentially this component needs all of the > functionality of HTTP4 component, just different processing after the call > and before the call. What is the best way to do this? Do I extend the HTTP4 > component? Is there a way to call the http4 component from inside my route? > What is the best practice here. Currently there are the same 15 lines of > route code all over the place and I would like to reduce that. > > *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* > *Author of: Hardcore Java (2003) and Maintainable Java (2012)* > *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39* > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta --089e011766e5499b2b04e8e3b89b--