After you have a WSDL, you must turn that WSDL into usable
proxy classes for WSDL.
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.
To generate proxy classes, follow these steps:
- Extract the CMWebService.zip file
into a temporary directory. The following files must
be extracted:
- CMWebService.wsdl
- cmbmessages.xsd
- cmdatamodel.xsd
- itemtype.xsd
- 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 2003 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.csYou might get warning messages when
you are executing the command, but you can ignore them. The proxy
class file is generated correctly.
- 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:
- Open the CMWebService.cs file in
an editor. Add an by using namespace clause. by using Microsoft.Web.Services;
- 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
{
- Save the CMWebService.cs file.