WebServiceBindingattribute Location property

  • Thread starter Thread starter Craig Neuwirt
  • Start date Start date
C

Craig Neuwirt

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
 
Hi,

I put the wsdl file on the production servers (cluster) in the same
location (http://myservername/wsdls/MyInterface.wsdl) and point the
location attribute to that location.

By the way are you implementing web service interface?

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Hello Natty,

That is certainly a solution to the problem. It would still be nice
to be able to do it independently of deployment, in particular for
development and testing purposes.
By the way are you implementing web service interface?

Do you mean extending the WebService class? If so, I am extending from
Web Service

public class MyWebService : WebService

Thanks,
Craig
 
No, creating interface for web services that should be implemented by
web services and can be call by clients using the Interface.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Back
Top