Generating proxy classes for .NET 1.1 client

After you have a WSDL, you must turn that WSDL into usable proxy classes for WSDL.

Before you begin

To generate the proxy classes, you must install the following software:
  • .NET framework SDK, Version 1, Release 1
  • .NET Web Services Enhancements, Version 1, Service Pack 1
  • .NET framework SDK, Version 1, Release 1, Hotfix 892202 is installed. Contact Microsoft™ for this hotfix.

About this task

To generate proxy classes, follow these steps:

Procedure

  1. Extract the CMWebService.zip file into a temporary directory.
    The following files must be extracted:
    • CMWebService.wsdl
    • cmbmessages.xsd
    • cmdatamodel.xsd
    • itemtype.xsd
  2. Open a command-line window and type the following command on one line:
    C:\VisualStudio2003\SDK\v1.1\Bin\wsdl.exe /language:CS 
    /out:CMWebService.cs file:///C:\CMWebServiceWSDL\CMWebService.wsdl

    You can do this step in Visual Studio .NET by adding a Web reference to file:///C:\CMWebServiceWSDL\CMWebService.wsdl.

    The command assumes that .NET SDK v1.1 is installed under C:\VisualStudio2003\SDK\v1.1 and the CMWebService.zip file is extracted in C:\CMWebServiceWSDL.

    The command generates a C# class file, CMWebService.cs

    You might get warning messages when you are executing the command, but you can ignore them. The proxy class file is generated correctly.

  3. Modify the C# proxy class.
    The proxy class CMWebService.cs is derived from System.Web.Services.Protocols.SoapHttpClientProtocol by default. To use the functionality of WSE 1.0 SDK, change the base class to WebServicesClientProtocol:
    1. Open the CMWebService.cs file in an editor. Add an by using namespace clause.
      by using Microsoft.Web.Services;
    2. Replace the class declaration code in the original example with the following modified example:
      Original
      public class CMWebService : System.Web.Services.Protocols.SoapHttpClientProtocol {
      Modified
      public class CMWebService : Microsoft.Web.Services.WebServicesClientProtocol {
    3. Save the CMWebService.cs file.