web service on alternate port - HHTP 'Host' field incorrect

G

Guest

The 'add web reference' in Visual Studio 2002 seems to be broken a bit

If I have the wsdl available a

http://myserver:8080/services/MyService.wsd

The Project -> Add Web Reference shows the correct WSDL. But after using 'Add Reference' the WSDL file is incorrect. It seems that the request for the WSDL from within VS sets the HTTP 'Host' field incorrectly, in that, it does not append the port, even thogh the request is being sent to the non-default port. According to the HTTP spec this is incorrect

When requesting the WSDL via the browser (IE, or the Project -> Add Web Reference) the 'host' field is set correctly

Is this a know bug

The work around is to manually edit the wsdl/generated class after retrieval to add the required port.
 
C

Cowboy

You can manually edit the web reference once captured to "correct" the URL
called. I have not tried this with a port, but I have used it numerous times
to change URLs from development to test and production.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
robert said:
The 'add web reference' in Visual Studio 2002 seems to be broken a bit.

If I have the wsdl available at

http://myserver:8080/services/MyService.wsdl

The Project -> Add Web Reference shows the correct WSDL. But after using
'Add Reference' the WSDL file is incorrect. It seems that the request for
the WSDL from within VS sets the HTTP 'Host' field incorrectly, in that, it
does not append the port, even thogh the request is being sent to the
non-default port. According to the HTTP spec this is incorrect.
When requesting the WSDL via the browser (IE, or the Project -> Add Web
Reference) the 'host' field is set correctly.
Is this a know bug?

The work around is to manually edit the wsdl/generated class after
retrieval to add the required port.
 
G

Guest

Thanks. That is what I have been doing. I guess I really posted it to inquire as to whether this is a kown bug with the WS Client Protocol..

I think I will cross-post to the Web-Services forum.
 

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

Top