Generating a proxy client (.NET)

.NET client applications use a proxy client to interact with the Web service APIs. A proxy client shields client applications from the complexity of the Web service messaging protocol.

Before you begin

To create a proxy client, you must first export a number of WSDL files from the WebSphere® environment and copy them to your client programming environment.

Note: If you have the WebSphere Process Server client CD, you can copy the files from there instead.

Why and when to perform this task

A proxy client comprises a set of C# bean classes. Each class contains all the methods and objects exposed by a single Web service. The service methods handle the assembly of parameters into complete SOAP messages, send SOAP messages to the Web service over HTTP, receives responses from the Web service, and handle any returned data.

Note: You only need to generate a proxy client once. All client applications accessing the Web services APIs can then use the same proxy client.

Steps for this task

  1. Use the WSDL command to generate a proxy client: Type:

    wsdl options WSDLfilepath

    Where:

    • options include:
      /language
      Allows you to specify the language used to create the proxy class. The default is C#. You can also specify VB (Visual Basic), JS (JScript), or VJS (Visual J#) as the language argument.
      /output
      The name of the output file, with the appropriate suffix. For example, proxy.cs
      /protocol
      The protocol implemented in the proxy class. SOAP is the default setting.

      For a complete list of WSDL.exe parameters , use the /? command line switch, or refer to the online help for the WSDL tool in Visual Studio.

    • WSDLfilepath is the path and filename of the WSDL file that you exported from the WebSphere environment or copied from the client CD.
    The following example generates a proxy client for the Human Task Manager Web services API:
    	wsdl /language:cs /output:proxyclient.cs c:\ws\bin\HTMWS.wsdl
  2. Compile the proxy client as a Dynamic Link Library (DLL) file.
Related tasks
Publishing WSDL files

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)