SoapReceivers.Add Method (EndpointReference, SoapReceiver, Boolean)

Adds the specified SoapReceiver to the collection and indexes it by the specified EndpointReference.

Namespace: Microsoft.Web.Services2.Messaging
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim endpoint As EndpointReference
Dim receiver As SoapReceiver
Dim passive As Boolean
SoapReceivers.Add(endpoint, receiver, passive)

Syntax

'Declaration
Overloads Public Shared Sub Add( _
    ByVal endpoint As EndpointReference, _
    ByVal receiver As SoapReceiver, _
    ByVal passive As Boolean _
)
public static void Add(
    EndpointReference endpoint, 
    SoapReceiver receiver, 
    bool passive
);
public: static Void Add(
    EndpointReference^ endpoint, 
    SoapReceiver^ receiver, 
    Boolean passive
);
public static void Add(
    EndpointReference endpoint, 
    SoapReceiver receiver, 
    boolean passive
);
public static function Add(
     endpoint : EndpointReference, 
     receiver : SoapReceiver, 
     passive : Boolean
);

Parameters

  • receiver
    The SoapReceiver which is being added to the collection.
  • passive
    true to indicate a passive receiver; otherwise, false.

Remarks

The Add method fails on a Windows 2000 or Windows XP operating system if the caller does not have Administrator permissions and the enabled attribute of the <exclusiveAddressUse> Element element is set to true (the default). If the caller does not have sufficient permissions, set the enabled attribute of the <exclusiveAddressUse> Element element to false to allow the method to succeed. Note that this does not apply to Windows Server 2003.

Passive receivers rely on an active listener to open and listen on a TCP port. Passive receivers only receive SOAP messages when an active listener is listening on the same port as the passive listener. Typically, a passive listener is used to receive SOAP responses, where there is one active listener and one or more passive listeners.

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 Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

SoapReceivers Class
Microsoft.Web.Services2.Messaging Namespace

Other Resources

SoapReceivers Members