By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,353 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,353 IT Pros & Developers. It's quick & easy.

How to override address location in WSDL ports

P: n/a
I have the same question as andreas.w.h.k asked on 1/5.

Our configuration is as follows:

The client must use the URL https://clustername.xyz.com/webservice.asmx to
access this web service.

clustername.xyz.com resolves to a virtual IP address on a hardware load
balancer which is listening for requests on port 443.

When the load balancer receives the request, it forwards it to any one of
the nodes in the cluster on port 8086.

The generated WSDL therefore looks like this:

<wsdl:service name="webservice">
<wsdl:port name="webserviceSoap" binding="tns:webserviceSoap">
<soap:address location="http://clustername.xyz.com:8086/webservice.asmx"
/>
</wsdl:port>
<wsdl:port name="webserviceSoap12" binding="tns:webserviceSoap12">
<soap12:address
location="http://clustername.xyz.com:8086/webservice.asmx" />
</wsdl:port>
<wsdl:port name="webserviceHttpGet" binding="tns:webserviceHttpGet">
<http:address location="http://clustername.xyz.com:8086/webservice.asmx"
/>
</wsdl:port>
<wsdl:port name="webserviceHttpPost" binding="tns:webserviceHttpPost">
<http:address location="http://clustername.xyz.com:8086/webservice.asmx"
/>
</wsdl:port>
</wsdl:service>

While we can make it work, it is far from idiot proof. For example, leaving
the "?wsdl" off the URL when adding a web reference in Visual Studio 2005
results in the message "Unable to download the following files from
http://clustername.xyz.com:8086/webservice.asmx?wsdl" because
http://clustername.xyz.com:8086 resolves to the load balancer's IP address
and the load balancer is not listening on port 8086, nor will it accept
unencrypted requests.

The most significant problem is that generated test harness is also useless
because although it lists the services and even allows you to click and enter
parameters, clicking the Invoke button posts back to a URL that can not be
reached.

It is unfortunate that System.Web.Services.WebService does not expose an
instance of System.Web.Services.Description since it looks like
Description.SoapAddressBinding.Location is exactly what we need to override.

Does anyone have any ideas?

Thank you.

Gavin M



Jan 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Can't you just assign the WebService.Url property?
--
Dale Preston
MCAD C#
MCSE, MCDBA
"GavinM" wrote:
I have the same question as andreas.w.h.k asked on 1/5.

Our configuration is as follows:

The client must use the URL https://clustername.xyz.com/webservice.asmx to
access this web service.

clustername.xyz.com resolves to a virtual IP address on a hardware load
balancer which is listening for requests on port 443.

When the load balancer receives the request, it forwards it to any one of
the nodes in the cluster on port 8086.

The generated WSDL therefore looks like this:

<wsdl:service name="webservice">
<wsdl:port name="webserviceSoap" binding="tns:webserviceSoap">
<soap:address location="http://clustername.xyz.com:8086/webservice.asmx"
/>
</wsdl:port>
<wsdl:port name="webserviceSoap12" binding="tns:webserviceSoap12">
<soap12:address
location="http://clustername.xyz.com:8086/webservice.asmx" />
</wsdl:port>
<wsdl:port name="webserviceHttpGet" binding="tns:webserviceHttpGet">
<http:address location="http://clustername.xyz.com:8086/webservice.asmx"
/>
</wsdl:port>
<wsdl:port name="webserviceHttpPost" binding="tns:webserviceHttpPost">
<http:address location="http://clustername.xyz.com:8086/webservice.asmx"
/>
</wsdl:port>
</wsdl:service>

While we can make it work, it is far from idiot proof. For example, leaving
the "?wsdl" off the URL when adding a web reference in Visual Studio 2005
results in the message "Unable to download the following files from
http://clustername.xyz.com:8086/webservice.asmx?wsdl" because
http://clustername.xyz.com:8086 resolves to the load balancer's IP address
and the load balancer is not listening on port 8086, nor will it accept
unencrypted requests.

The most significant problem is that generated test harness is also useless
because although it lists the services and even allows you to click and enter
parameters, clicking the Invoke button posts back to a URL that can not be
reached.

It is unfortunate that System.Web.Services.WebService does not expose an
instance of System.Web.Services.Description since it looks like
Description.SoapAddressBinding.Location is exactly what we need to override.

Does anyone have any ideas?

Thank you.

Gavin M


Jan 22 '06 #2

P: n/a
We are currently doing that (on the client), as a work around. Being able to
override the address provided in the WSDL is helpful, but my question is how
do I correct the WSDL?

If it were possible to specify this.Url = ... in the constructor of the
service (on the server) that would be great. However, unless I am missing
something, there is no such property.

Gavin M

"Dale" wrote:
Can't you just assign the WebService.Url property?
--
Dale Preston
MCAD C#
MCSE, MCDBA

Jan 23 '06 #3

P: n/a
GavinM wrote:
We are currently doing that (on the client), as a work around. Being able to
override the address provided in the WSDL is helpful, but my question is how
do I correct the WSDL?

If it were possible to specify this.Url = ... in the constructor of the
service (on the server) that would be great. However, unless I am missing
something, there is no such property.


I am having the same problem. When our web service is installed, the
generated WSDL is incorrect, so users can't get the correct URLs.

I know that the generated address can't be exact, but surely it would
have been more sensible to work out the service URLs from the request URL?

Rik
Feb 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.