Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

WebServiceBindingAttribute Location property

I am developing a WebService that provides custom WSDL files for each binding
using a WebServiceBindingAttribute similiar to the following.

[WebServiceBinding(
Name"BindingName",
Namespace="BindingNamespace",
Location="http://localhost/wsdl/Binding.wsdl")]

My problem is that when the full Web Service WSDL is generated, import of
the wsdl references the 'localhost'. Therefore, I cannot deploy the Web
Services on another machine without changing the code. This seems to make
the Location property useless.

<import namespace="BindingNamespace" location="http://localhost/wsdl/Binding.wsdl"
/>

Is this a correct assumption? If so, how can a make the Location property
dependent on the local ip address?

thannks,
craig
[821 byte] By [Craig.Neuwirt] at [2007-11-9 19:48:27]