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

Wrong address in WSDL generated by .NET - Unable to add web Refere

P: n/a
I have a web service created via Visual Web Developer Express Edition on a
IIS Server with .NET 2.0 installed. The test page displays just fine when the
URL of the .asmx page is entered into a browser i.e.
"http://www.mydomain.com/Extranet/WebServices/TestWebServ.asmx"

The WSDL displayed when accessing the .asmx via
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl file has
the wrong address location. It displays

<soap12:address
location="http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx"
/>
The "extranet" should not be in front of the "mydomain.com"; where
"mydomain.com" is the domain name for the site

Also, when i try to add the web reference to the client web app that will be
consuming the web service, I get a message "Unable to download files from
"http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx?wsdl"

I seems like the computer name is being used as the first part of the
location address . The machine is named EXTRANET.mydomain.com

Any one know why and what the fix is?

Thanks in advance,

WebDev2
Aug 11 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"WebDev2" <We*****@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
>I have a web service created via Visual Web Developer Express Edition on a
IIS Server with .NET 2.0 installed. The test page displays just fine when
the
URL of the .asmx page is entered into a browser i.e.
"http://www.mydomain.com/Extranet/WebServices/TestWebServ.asmx"

The WSDL displayed when accessing the .asmx via
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl file
has
the wrong address location. It displays

<soap12:address
location="http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx"
/>
The "extranet" should not be in front of the "mydomain.com"; where
"mydomain.com" is the domain name for the site

Also, when i try to add the web reference to the client web app that will
be
consuming the web service, I get a message "Unable to download files from
"http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx?wsdl"

I seems like the computer name is being used as the first part of the
location address . The machine is named EXTRANET.mydomain.com

Any one know why and what the fix is?
Yes. Do not use the WSDL which .NET returns to you when using the "?wsdl"
syntax. That WSDL is generated by .NET by examining your web service class.
..NET will invent this WSDL for you, out of its own imagination, which may
not match your imagination.

Now, I take it that you want to have a WSDL which specified the location of
the service as www.mydomain.com instead of extranet.mydomain.com. If that's
the case, then you need to create a WSDL that says so. .NET has no way to
know that you want to use www.mydomain.com even though that's an alias for
"extranet.mydomain.com".

John
Aug 12 '06 #2

P: n/a
Ok. I am new to all this. How do I create the WSDL file and what should it
look like? Is there a .Net tool that will create a WSDL file for me?

Webdev2

"John Saunders" wrote:
"WebDev2" <We*****@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
I have a web service created via Visual Web Developer Express Edition on a
IIS Server with .NET 2.0 installed. The test page displays just fine when
the
URL of the .asmx page is entered into a browser i.e.
"http://www.mydomain.com/Extranet/WebServices/TestWebServ.asmx"

The WSDL displayed when accessing the .asmx via
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl file
has
the wrong address location. It displays

<soap12:address
location="http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx"
/>
The "extranet" should not be in front of the "mydomain.com"; where
"mydomain.com" is the domain name for the site

Also, when i try to add the web reference to the client web app that will
be
consuming the web service, I get a message "Unable to download files from
"http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx?wsdl"

I seems like the computer name is being used as the first part of the
location address . The machine is named EXTRANET.mydomain.com

Any one know why and what the fix is?

Yes. Do not use the WSDL which .NET returns to you when using the "?wsdl"
syntax. That WSDL is generated by .NET by examining your web service class.
..NET will invent this WSDL for you, out of its own imagination, which may
not match your imagination.

Now, I take it that you want to have a WSDL which specified the location of
the service as www.mydomain.com instead of extranet.mydomain.com. If that's
the case, then you need to create a WSDL that says so. .NET has no way to
know that you want to use www.mydomain.com even though that's an alias for
"extranet.mydomain.com".

John
Aug 14 '06 #3

P: n/a
"WebDev2" <We*****@discussions.microsoft.comwrote in message
news:9B**********************************@microsof t.com...
Ok. I am new to all this. How do I create the WSDL file and what should it
look like? Is there a .Net tool that will create a WSDL file for me?
When you use
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl, that is
a tool creating a WSDL file for you. Perhaps you should take that file, and
edit the location of the service. From now on, that edited file is your
official WSDL, not what comes from "?wsdl".

John
Webdev2

"John Saunders" wrote:
>"WebDev2" <We*****@discussions.microsoft.comwrote in message
news:EA**********************************@microso ft.com...
>I have a web service created via Visual Web Developer Express Edition on
a
IIS Server with .NET 2.0 installed. The test page displays just fine
when
the
URL of the .asmx page is entered into a browser i.e.
"http://www.mydomain.com/Extranet/WebServices/TestWebServ.asmx"

The WSDL displayed when accessing the .asmx via
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl file
has
the wrong address location. It displays

<soap12:address
location="http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx"
/>
The "extranet" should not be in front of the "mydomain.com"; where
"mydomain.com" is the domain name for the site

Also, when i try to add the web reference to the client web app that
will
be
consuming the web service, I get a message "Unable to download files
from
"http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx?wsdl"

I seems like the computer name is being used as the first part of the
location address . The machine is named EXTRANET.mydomain.com

Any one know why and what the fix is?

Yes. Do not use the WSDL which .NET returns to you when using the "?wsdl"
syntax. That WSDL is generated by .NET by examining your web service
class.
..NET will invent this WSDL for you, out of its own imagination, which
may
not match your imagination.

Now, I take it that you want to have a WSDL which specified the location
of
the service as www.mydomain.com instead of extranet.mydomain.com. If
that's
the case, then you need to create a WSDL that says so. .NET has no way
to
know that you want to use www.mydomain.com even though that's an alias
for
"extranet.mydomain.com".

John

Aug 14 '06 #4

P: n/a
Rather than edit the WSDL, I solved the problem by using some code from Kirt
Allens blog (http://blogs.msdn.com/kaevans/archiv...16/493496.aspx)
Modify a Web Service's WSDL Using a SoapExtensionReflector. Rather than
replacing the https, I replaced the "extranet" token in the generated WSDL.
Works great.

Webdev2

"John Saunders" wrote:
"WebDev2" <We*****@discussions.microsoft.comwrote in message
news:9B**********************************@microsof t.com...
Ok. I am new to all this. How do I create the WSDL file and what should it
look like? Is there a .Net tool that will create a WSDL file for me?

When you use
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl, that is
a tool creating a WSDL file for you. Perhaps you should take that file, and
edit the location of the service. From now on, that edited file is your
official WSDL, not what comes from "?wsdl".

John
Webdev2

"John Saunders" wrote:
"WebDev2" <We*****@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
I have a web service created via Visual Web Developer Express Edition on
a
IIS Server with .NET 2.0 installed. The test page displays just fine
when
the
URL of the .asmx page is entered into a browser i.e.
"http://www.mydomain.com/Extranet/WebServices/TestWebServ.asmx"

The WSDL displayed when accessing the .asmx via
http://www.mydomain.com/Extranet/Web...Serv.asmx?wsdl file
has
the wrong address location. It displays

<soap12:address
location="http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx"
/>
The "extranet" should not be in front of the "mydomain.com"; where
"mydomain.com" is the domain name for the site

Also, when i try to add the web reference to the client web app that
will
be
consuming the web service, I get a message "Unable to download files
from
"http://extranet.mydomain.com/Extranet/WebServices/TestWebServ.asmx?wsdl"

I seems like the computer name is being used as the first part of the
location address . The machine is named EXTRANET.mydomain.com

Any one know why and what the fix is?

Yes. Do not use the WSDL which .NET returns to you when using the "?wsdl"
syntax. That WSDL is generated by .NET by examining your web service
class.
..NET will invent this WSDL for you, out of its own imagination, which
may
not match your imagination.

Now, I take it that you want to have a WSDL which specified the location
of
the service as www.mydomain.com instead of extranet.mydomain.com. If
that's
the case, then you need to create a WSDL that says so. .NET has no way
to
know that you want to use www.mydomain.com even though that's an alias
for
"extranet.mydomain.com".

John


Aug 16 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.