Using a web service in Visual Studio 2003 
July 3rd, 2009, 01:06 PM
| | Newbie | | Join Date: Jul 2009
Posts: 8
| | |
Hi,
I am new to web services but I have been asked to connect to an external web service through Visual Studio 2003.
The problem that I have is that the company who developed the web service have not and will not publish their WSDL online and the web service is in the form of a .svc file.
The other problem is that I have to go through a proxy server for external access.
I have created a new console app in VS2003 and tried to add a web reference pointing to the url of the .svc file but I get an error: The proxy settings on this computer are not configured correctly for web discovery. Click the Help button for more information.
I think that I need to configure my proxy settings in some way.
Please could someone give me some advice on how I connect and use this web service which is in the format of a .svc file.
Thanks in advance
Gary
| 
July 3rd, 2009, 03:21 PM
| | Newbie | | Join Date: Jul 2009
Posts: 8
| | | re: Using a web service in Visual Studio 2003
Hi,
In a console app, I am trying to add a web reference to an external web service in Visual Studio 2003. The web service that I am trying to connect to is a .svc file and we connect through a proxy.
When I enter the URL and click Go in the Add Web reference screen in VS2003, I get an error which reads:- There was an error downloading 'http://............dummyws1.svc'.
The request failed with HTTP status 400: Bad Request.
I believe this is because of the http version that we are running, how do I change it for this request to the web service?
Thanks in advance
Gary
| 
July 3rd, 2009, 05:29 PM
|  | Forum Leader | | Join Date: Apr 2008 Location: San Antonio, TX (USA)
Posts: 2,569
| | | re: Using a web service in Visual Studio 2003
Hmm, did clicking the help button give you any useful advice?
| 
July 3rd, 2009, 05:39 PM
| | Newbie | | Join Date: Jul 2009
Posts: 4
| | | re: Using a web service in Visual Studio 2003
You may need to provide the proxy connection in the creation of the service object as described in this article: http://www.codeproject.com/KB/webser...xy.aspx?df=100
Extracted code: -
Dim service As New YourService.Class
-
Dim credentials As New System.Net.NetworkCredential("username", "password", "domain")
-
Dim proxy As New System.Net.WebProxy("10.0.0.1", 80)
-
service.Proxy = proxy
-
Hope that is relevant.
Cheers,
Scott
| 
July 7th, 2009, 10:22 AM
| | Newbie | | Join Date: Jul 2009
Posts: 8
| | | re: Using a web service in Visual Studio 2003
Hi,
In a console app, I am trying to add a web reference to an external web service in Visual Studio 2003. The web service that I am trying to connect to is a .svc file and we connect through a proxy.
When I enter the URL and click Go in the Add Web reference screen in VS2003, I get an error which reads:- There was an error downloading 'http://............dummyws1.svc'.
The request failed with HTTP status 400: Bad Request.
Does anyone have any ideas what might be causing this. I got the same error when trying to connect to this web service using SoapUI, but got it resolved by changing the http version from 0.9 to 1.1 within SoapUI.
Could this be the same problem? How do I correct this in VS2003?
Thanks in advance
Gary
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,652 network members.
|