Export (0) Print
Expand All
2 out of 6 rated this helpful - Rate this topic

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
Dim soapClient1 As New SoapClient()
public abstract class SoapClient : SoapSender
public abstract class SoapClient extends SoapSender
public abstract class SoapClient extends SoapSender

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.


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

Development Platforms

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

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.