How do I override the soap:address field in the auto-generated WSDL document?

R

Ray Johnson

My web service will be served on a farm of servers. However, the WSDL
document that get's created
uses information about the local machine. More specifically the
"soap:address" field is set to something
like this:

<soap:address location=http://webserver1:7000/ingenio.asmx />

However, for people to use the real service they need to hit a different
address on our
load balancer. So the soap:address really should be something like this:

<soap:address location=http://services.ingenio.com/ingenio.asmx />

I have been unable to figure out how to tell the .asmx page to generate a
different WSDL
file with the proper address. ANyone know how to do this?

Ray
 
J

Jan Tielens

Check out following article:
http://msdn.microsoft.com/webservices/default.aspx?pull=/library/en-us/dnweb
srv/html/insidewsdl.asp#insidewsdl_code15

Inside WSDL with .NET Attribution
Code block 15 depicts the service element for the MyStore Web service. The
port element is actually a sub-element located under the Service element.
(The Service element will be discussed in the next section.) The port is
given a unique name within the Service element, which in this case is
MyStoreSoap and is linked to a previously defined binding, also named
MyStoreSoap, via the binding attribute. Finally and most importantly, the
port element contains a SOAP address element that specifies the physical
address of this port. If you are using the HTTP transport, then this address
is a URL. If the transport specified in the Bindings element is SMTP, then
this address would be an e-mail address. All requests transmitted to this
address must use the transport and protocol specified in the MyStoreSoap
binding element.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top