You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Francisco Suarez Sola <ig...@noao.edu> on 2011/09/01 01:34:28 UTC
Re: handling multiple service ports
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.
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 <ig...@noao.edu> 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.
>
> <wsdl:service name="SomeService">
> <wsdl:port name="SomeServicePort01">
> <soap:address location="http://server.at.machine1" />
> </wsdl:port>
> <wsdl:port name="SomeServicePort02">
> <soap:address location="http://server.at.machine2" />
> </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 "-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/
Re: handling multiple service ports
Posted by Amila Suriarachchi <am...@gmail.com>.
On Thu, Sep 1, 2011 at 5:04 AM, Francisco Suarez Sola <ig...@noao.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
>
> 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 <ig...@noao.edu>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.
>>
>> <wsdl:service name="SomeService">
>> <wsdl:port name="SomeServicePort01">
>> <soap:address location="http://server.at.machine1" />
>> </wsdl:port>
>> <wsdl:port name="SomeServicePort02">
>> <soap:address location="http://server.at.machine2" />
>> </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
>> "-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/