Share via


Creating Clients for XML Web Services

An XML Web service client is any component or application that communicates with an XML Web service using SOAP messages. XML Web service clients can be traditional client applications. However, a client can also be another Web application (In this situation, the Web application would consume the XML within the SOAP message, format it, and send back to an ultimate client — perhaps a Web browser).

Create an XML Web service client by following these basic steps:

  1. Create a proxy class for the XML Web service.
  2. Reference the proxy class in the client code.
  3. Create an instance of the proxy class in the client code.
  4. If anonymous access has been disabled for the Web application hosting the XML Web service, set the WebClientProtocol.Credentials Property of the proxy class.
  5. Call the method on the proxy class corresponding to the XML Web service method you want to communicate with.

For most clients, these steps differ only in how the proxy class is referenced and how the XML Web service client is deployed.

In This Section

  • Creating an ASP.NET Web Form Client
    Provides the steps for creating a Web Form client to an XML Web service. The steps for creating an XML Web service that acts as both a client to another XML Web service and an XML Web service provider are identical, with the exception of where the client code is placed. For an XML Web service, the client code is placed within the code for an XML Web service method.
  • Creating a Console Application Client
    Provides the steps for creating a console application that is a client to an XML Web service.

See Also

Building XML Web Service Clients | Discovering XML Web Services | Creating an XML Web Service Proxy | Creating Clients for XML Web Services | Exploring Existing XML Web Services Created Using ASP.NET | Communicating with XML Web Services Asynchronously | Accessing XML Web Services from a Browser