Return-Path: X-Original-To: apmail-axis-java-user-archive@www.apache.org Delivered-To: apmail-axis-java-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 857C880A6 for ; Thu, 1 Sep 2011 09:08:15 +0000 (UTC) Received: (qmail 60643 invoked by uid 500); 1 Sep 2011 09:08:12 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 59869 invoked by uid 500); 1 Sep 2011 09:07:46 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 59176 invoked by uid 99); 1 Sep 2011 09:07:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 09:07:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of amilasuriarachchi@gmail.com designates 209.85.218.45 as permitted sender) Received: from [209.85.218.45] (HELO mail-yi0-f45.google.com) (209.85.218.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 09:07:33 +0000 Received: by yih10 with SMTP id 10so1669743yih.32 for ; Thu, 01 Sep 2011 02:07:12 -0700 (PDT) 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; bh=f+FUAkRJJczXFMg7srY78ultkRjTL4XIQWlSi1CiSpo=; b=F8I+ZOTNWqMBicbuNL/yaDeDMfddXbkfapag/5eRYL+ZcpGncfLLGfn7Nn32Is0f/9 or1DvaaldycY0fHhVA9PHE9XHySB0yEZ53Sq+Jca1Zaj4SaLLlF71UU/77kAyutpZ8Z8 cZcV4BH/oae3G6jNnTGyFMYSURyQjvCYXkuBc= MIME-Version: 1.0 Received: by 10.236.152.100 with SMTP id c64mr7272972yhk.124.1314868032671; Thu, 01 Sep 2011 02:07:12 -0700 (PDT) Received: by 10.236.203.231 with HTTP; Thu, 1 Sep 2011 02:07:12 -0700 (PDT) In-Reply-To: References: <6D5E9772-2FDF-4F55-8AD3-FFFEA35700DF@noao.edu> Date: Thu, 1 Sep 2011 14:37:12 +0530 Message-ID: Subject: Re: handling multiple service ports From: Amila Suriarachchi To: java-user@axis.apache.org Content-Type: multipart/alternative; boundary=20cf303f6356038ede04abdd9282 --20cf303f6356038ede04abdd9282 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Sep 1, 2011 at 5:04 AM, Francisco Suarez Sola wrote: > Thanks Amila, > > That's a good point however what happens when the load balancer is also > down. I'm surprised there is nothing on the client side. E.g. if port A > fails, try port B if fails, try port C > > If there isn't anything else I guess the user can always fish out the port > addresses from the WSDL and then code a simple round-robin. > yes. Currently from the Axis2 level there is no such support. you need to implement the code to call the ports in round robin manner. thanks, Amila. > > Thanks > > Igor > > > On Aug 31, 2011, at 2:11 AM, Amila Suriarachchi wrote: > > If you want to load balance a service I think the better way is to use a > load balancer at the service side. > > you can use either httpd or Apache synapse. > > Then client stub can send the messages to that port. > > eg. > > client stub ----------> load balancer ----------> Service 1 > Service2 > > thanks, > Amila. > > On Wed, Aug 31, 2011 at 12:41 AM, Francisco Suarez Sola wrote: > >> >> Hi, >> >> What is the proper way to handle multiple endpoints for a service in the >> WSDL?. Maybe even implement a round-robin load balancer for the client?. >> >> E.g. >> >> >> >> >> >> >> >> >> >> >> I'm using the stub generator, wsdl2java, and it seems it defaults to a >> particular endpoint. If I want to include more than one I have to use the >> "-ap" option, but this generates separate code for both end points. The stub >> classes don't implement a common interface but simply inherit from the Stub >> superclass, making the implementation of, lets say, a round-robin load >> balancer in the client, cumbersome. >> >> Is it there a way to deal with this? >> >> Many thanks in advance, >> >> Igor >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org >> For additional commands, e-mail: java-user-help@axis.apache.org >> >> > > > -- > Amila Suriarachchi > WSO2 Inc. > blog: http://amilachinthaka.blogspot.com/ > > > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ --20cf303f6356038ede04abdd9282 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Sep 1, 2011 at 5:04 AM, Francisc= o Suarez Sola <igor@n= oao.edu> wrote:
Thanks Amila,

= That's a good point however what happens when the load balancer is also= down. I'm surprised there is nothing on the client side. E.g. if port = A fails, try port B if fails, try port C=A0

If there isn't anything else I guess the user can always= fish out the port addresses from the WSDL and then code a simple round-rob= in.

yes. Currently from the Axis2 level th= ere is no such support. you need to implement the code to call the ports in= round robin manner.

thanks,
Amila.

Th= anks

Igor

On Aug 31, 2011, at 2:11 AM, Amila Suriarachchi wrote:

=
If you want to load balance a service I think the= better way is to use a load balancer at the service side.

you can use either httpd or Apache synapse.

Then client stub can= send the messages to that port.

eg.

client stub ----------> load balancer ----------> Serv= ice 1
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Service2

thanks,
A= mila.

On Wed, Aug 31, 2011 at 12:41 AM, F= rancisco Suarez Sola <igor@noao.edu> wrote:

Hi,

What is the proper way to handle multiple endpoints for a service in the WS= DL?. Maybe even implement a round-robin load balancer for the client?.

E.g.

<wsdl:service name=3D"SomeService">
=A0 <wsdl:port name=3D"SomeServicePort01">
=A0 =A0 =A0<soap:address location=3D"http://server.at.machine1" />
=A0 </wsdl:port>
=A0 <wsdl:port name=3D"SomeServicePort02">
=A0 =A0 =A0<soap:address location=3D"http://server.at.machine2" />
=A0 </wsdl:port>
</wsdl:service>

I'm using the stub generator, wsdl2java, and it seems it defaults to a = particular endpoint. If I want to include more than one I have to use the &= quot;-ap" option, but this generates separate code for both end points= . The stub classes don't implement a common interface but simply inheri= t from the Stub superclass, making the implementation of, lets say, a round= -robin load balancer in the client, cumbersome.

Is it there a way to deal with this?

Many thanks in advance,

Igor
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org




--
Amila Suriarachchi
W= SO2 Inc.
blog: http://amilachinthaka.blogspot.com/





--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/
--20cf303f6356038ede04abdd9282--