Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
WSE 3.0
Class Library
SoapClient Class

  Switch on low bandwidth view
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)

Visual Basic
Dim soapClient1 As New SoapClient()
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

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.


System.Object
   Microsoft.Web.Services3.Messaging.SoapPort
     Microsoft.Web.Services3.Messaging.SoapSender
      Microsoft.Web.Services3.Messaging.SoapClient
         Microsoft.Web.Services3.Security.SecurityTokenServiceClient
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

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker