Return-Path: X-Original-To: apmail-tuscany-user-archive@www.apache.org Delivered-To: apmail-tuscany-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 447DB785C for ; Fri, 25 Nov 2011 22:33:26 +0000 (UTC) Received: (qmail 51913 invoked by uid 500); 25 Nov 2011 22:33:26 -0000 Delivered-To: apmail-tuscany-user-archive@tuscany.apache.org Received: (qmail 51880 invoked by uid 500); 25 Nov 2011 22:33:25 -0000 Mailing-List: contact user-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@tuscany.apache.org Delivered-To: mailing list user@tuscany.apache.org Received: (qmail 51873 invoked by uid 99); 25 Nov 2011 22:33:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2011 22:33:25 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of luckbr1975@gmail.com designates 209.85.161.181 as permitted sender) Received: from [209.85.161.181] (HELO mail-gx0-f181.google.com) (209.85.161.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2011 22:33:20 +0000 Received: by ggnr1 with SMTP id r1so5384261ggn.26 for ; Fri, 25 Nov 2011 14:32:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=bxa+d2TDCyb+8tfAgYeztTa10z6YoJmdcLmzlAKV9sE=; b=KlyUgC5SWyV735/eoTWx6lGCm1+NPHNICunDfLiUZfW8Y+g8+tGP65d4diTgega8Sk 4locGFRq4pMKTkVGM2OFwgLSrabT1Cfk1Z2awthaQON6vxKCSmRqgF2l+RVkzUOEYOnZ KAgptWYtWmeyJ0DOh3RWhaVPYPMi2uqFoJRl8= MIME-Version: 1.0 Received: by 10.182.222.7 with SMTP id qi7mr10516375obc.43.1322260379365; Fri, 25 Nov 2011 14:32:59 -0800 (PST) Received: by 10.182.14.103 with HTTP; Fri, 25 Nov 2011 14:32:59 -0800 (PST) In-Reply-To: <4ECE22FC.3020003@aps-prevoyance.fr> References: <4ECE22FC.3020003@aps-prevoyance.fr> Date: Fri, 25 Nov 2011 23:32:59 +0100 Message-ID: Subject: Re: Default WS port - Tuscany 2 runtime From: Luciano Resende To: user@tuscany.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Nov 24, 2011 at 11:57 AM, Antonio De Berardis wrote: > Hi, > > I have a question about web service binding, for example: > > > =C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0 > > > When I deploy this component in a webapp on Tomcat, It publishes a servic= e > at http://localhost:8085/HelloworldComponent/Helloworld. The > =E2=80=9Clocalhost:8085=E2=80=9D seems to be a default value. > > I actually have lots of Tuscany based webapps with many components in the= m, > therefore all publishing their webservices at http://localhost:8085/... > > One way to change that is to set the uri attribute in binding.ws. , which > means that if I want to relocate my webservices in the future I will have= to > change the URI in each and every one of my webapps. > > Is there a way to set a default "Host:Port"? I'm using the tuscany.war > deployed on Tomcat, is there may be a way to do this in the Tomcat=E2=80= =99s conf or > in Tuscany.war? > Or if not, what do you think is better to do? Let binding.ws with no URI = or > define it in each WS? Am I missing something? Are you planning to change > this behavior? > > Best Regards. > > Antonio > We recently did a little workaround to allocate ports, particularly for test environments, in [1], where you can define your own implementation which can choose ports based on a property file, or environment variable. I'm starting to think that it would be a good idea to be able to add support for some basic macro resolution/expansion to pieces of the composite (e.g. properties to be resolved based on contents of a external file which would allow you to reuse existent configuration to resolve hostnames, etc) [1] https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/hos= t-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPor= tAllocator.java --=20 Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/