The type 'System.Web.Services.Protocols.SoapHttpClientProtocol' i

Discussions

XML & Web services: The type 'System.Web.Services.Protocols.SoapHttpClientProtocol' i

  1. I created a dll for a web service by compilint the proxy using thi following command.


    E:\Me\MyProjects\MyWebServices>c:\Windows\Microsoft.net\Framework\v2.0.50727
    \csc.exe /t:library /r:System.web.Services.dll /r:System.xml.dll Results.cs


    I get a file Results.dll.


    I created a console application and added refrence to Results.dll


    Now I try to access it as follows:


    private static void GetFG(string CaseNum)
    {
    Results Res = new Results();
    DataSet ds = new DataSet();
    ds = Res.Get_Results(Case);
    ds.WriteXml("Res.xml");
    }

    When I compile this, I get the following error:

    Error 1 The type 'System.Web.Services.Protocols.SoapHttpClientProtocol' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. E:\Me\MyProjects\ResultsWebServicesConsoleClient1\ResultsWebServicesConsoleClient1\Results.cs 16 13 ResultsWebServicesConsoleClient1


    what am I missing?

  2. Just added refrence to Syatem.Web.Refrence and build it again. It works..

    Ye...!