views:

272

answers:

1

Hi All,

Apologies for the long winded title but looking for a solution to what might be a common problem.

We have a loadbalancer with address, say: www.myloadbalancer.com Below is two web servers

First server: webserver1.farm.com Second server: webserver2.farm.com

We deployed a webservice on to the two servers but noticed something funny when trying to consume the web services somewhere else.

We deploy to: webserver1.farm.com/service1.svc and webserver2.farm.com/service1.svc

Because the web servers are not directly accessible online you have to go through the load balancer.

So the address to consume is www.myloadbalancer.com/service1.svc.

However what we are finding is that if the loadbalancer directs you to server 1, and you check the WSDL, you see the service name and details as webserver1.farm.com/service1.svc not www.myloadbalancer.com/service1.svc

If you attempt to consume www.myloadbalancer.com/service1.svc, say in visual studio 2008, you get a warning that webserver1.farm.com/service1.svc does not exist.

The main question is, is it possible to give an alias name to a webservice. in other words is it possible to get the service to describe itself as www.myloadbalancer.com/service1.svc regardless of whether we end up on web server 1 or 2?

Thanks all

John

+2  A: 

A WSDL file is a WSDL file. Edit it to point to the correct URL. (You don't have to use the auto-generated http://webserver1.farm.com/service1.svc?WSDL if you don't want to.)

Pontus Gagge
Is it really that simple ;) I will try...
Solyad
This tutorial may explain it? http://www.pluralsight.com/community/blogs/kirillg/archive/2006/06/18/28380.aspx
Solyad