Share via


SoapReceiver Class

Provides a base class for receiving SOAP messages using the SOAP Messaging feature set.

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

Usage

'Usage
Dim soapReceiver1 As New SoapReceiver()

Syntax

'Declaration
MustInherit Public Class SoapReceiver
    Inherits SoapPort
    Implements IHttpHandler
public abstract class SoapReceiver : SoapPort, IHttpHandler
public abstract ref class SoapReceiver : public SoapPort, IHttpHandler
public abstract class SoapReceiver extends SoapPort implements IHttpHandler
public abstract class SoapReceiver extends SoapPort implements IHttpHandler

Example

The following code example shows how to write a class that handles the receipt of SOAP messages.

Class MyReceiver
   Inherits SoapReceiver
   
   Protected Overloads Overrides Sub Receive(message As SoapEnvelope)
   End Sub 'Receive
End Class 'MyReceiver 'Processing of message goes here
class MyReceiver : SoapReceiver
{
    protected override void Receive( SoapEnvelope message )
    {
        //Processing of message goes here
    }        
}

Remarks

To receive messages using SoapReceiver, you must register it. This is done either by adding it to the SoapReceivers collection if the SOAP message is to be received via any protocol other than HTTP, or by adding an <add> Element for <httpHandlers> entry to a configuration file if the message is to be received via the HTTP protocol.

Notes to Inheritors: When you inherit from SoapReceiver, you must override the Receive method.

Inheritance Hierarchy

System.Object
   Microsoft.Web.Services2.Messaging.SoapPort
    Microsoft.Web.Services2.Messaging.SoapReceiver
       Microsoft.Web.Services2.Messaging.SoapService

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

Microsoft.Web.Services2.Messaging Namespace

Other Resources

SoapReceiver Members
ms824627(v=msdn.10).md