Export (0) Print
Expand All

Anatomy of an XML Web Service Lifetime

The process that occurs when you make an XML Web service call is similar to the process that occurs when making a regular method call. The main difference is that instead of calling a method that is located in the client application, you generate a request message over the specified transport, such as HTTP. Because the XML Web service method can be located on a different computer, the information that the XML Web service needs to process the request must be passed across the network to the server that hosts the XML Web service. The XML Web service processes the information and sends the result back, over the network, to the client application.

The following illustration shows the process of communication between a client and an XML Web service.

XML Web service lifetime

x05s00wz.xmlwebservicelifetime(en-us,VS.71).gif

The following describes the sequence of events that occur when an XML Web service is called:

  1. The client creates a new instance of an XML Web service proxy class. This object resides on the same computer as the client.
  2. The client invokes a method on the proxy class.
  3. The infrastructure on the client computer serializes the arguments of the XML Web service method into a SOAP message and sends it over the network to the XML Web service.
  4. The infrastructure receives the SOAP message and deserializes the XML. It creates an instance of the class implementing the XML Web service and invokes the XML Web service method, passing in the deserialized XML as arguments.
  5. The XML Web service method executes its code, eventually setting the return value and any out parameters.
  6. The infrastructure on the Web server serializes the return value and out parameters into a SOAP message and sends it over the network back to the client.
  7. The XML Web service infrastructure, on the client computer, receives the SOAP message, deserializes the XML into the return value and any out parameters, and passes them to the instance of the proxy class.
  8. The client receives the return value and any out parameters.

See Also

XML Web Services Overview

Show:
© 2015 Microsoft