Web Services Enhancements 3.0
SoapClient Class
Represents a client for sending SOAP messages using transport-independent protocols.


Namespace: Microsoft.Web.Services3.Messaging
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

Visual Basic
Dim soapClient1 As New SoapClient()
Syntax

Visual Basic
MustInherit Public Class SoapClient
    Inherits SoapSender
C#
public abstract class SoapClient : SoapSender
C++
public ref class SoapClient abstract : SoapSender
J#
public abstract class SoapClient extends SoapSender
JScript
public abstract class SoapClient extends SoapSender
Remarks

When a class is derived from the SoapClient class, it is used to send SOAP request messages to a Web service and to receive SOAP response messages from that Web service using the SendOneWay and/or the SendRequestResponse methods. When SendOneWay is called, a SOAP request is sent to the Web service and the method does not wait for a response. In contrast, when SendRequestResponse is called, a SOAP request is sent to the Web service and the method does not return until a response is received. When a SOAP response message is required and you do not want to block the thread, use the .NET Framework asynchronous design pattern to send the SOAP message request using the BeginSendRequestResponse method.

SOAP messages can be constructed from a SoapEnvelope or a serializable object passed into the SendOneWay or SendRequestResponse method. Use a SoapEnvelope when you must add your own SOAP headers or access the SoapContext for a SOAP message. The SoapContext for a SoapEnvelope is accessed using the Context property. When a serializable object is used, it is serialized into the < Body> element. Programmatic access to the SoapContext for the SOAP message is not available when a serializable object is used. Instead, configure the send policy so that the WSE adds required elements to the SOAP message.


Inheritance Hierarchy

>System.Object
   Microsoft.Web.Services3.Messaging.SoapPort
     Microsoft.Web.Services3.Messaging.SoapSender
      Microsoft.Web.Services3.Messaging.SoapClient
         Microsoft.Web.Services3.Security.SecurityTokenServiceClient
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Page view tracker