Using a web service in Visual Studio 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gjones
    New Member
    • Jul 2009
    • 10

    Using a web service in Visual Studio 2003

    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
  • gjones
    New Member
    • Jul 2009
    • 10

    #2
    Connecting to 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://............dum myws1.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

    Comment

    • Curtis Rutland
      Recognized Expert Specialist
      • Apr 2008
      • 3264

      #3
      Hmm, did clicking the help button give you any useful advice?

      Comment

      • scott1010
        New Member
        • Jul 2009
        • 6

        #4
        You may need to provide the proxy connection in the creation of the service object as described in this article:



        Extracted code:

        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

        Comment

        • gjones
          New Member
          • Jul 2009
          • 10

          #5
          Connecting to a svc 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://............dum myws1.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

          Comment

          Working...