Sending and Receiving SOAP Messages Using WSE Messaging API
The Web Services Enhancements for Microsoft .NET (WSE) enables you to send and receive SOAP messages by using the TCP protocol. This can be accomplished with or without an HTTP server, making it possible to write flexible and lightweight Web services. The WSE supports both a one-way messaging model and a request/response pair model. One-way messaging is accomplished using the SoapSender and SoapReceiver classes while the SoapClient and SoapService classes support both one-way and request/response messaging.
Before you deploy an application that sends and receives SOAP messages using the TCP protocol, a security expert should perform a security analysis on the parts of the application that are potentially open to attack. WSE helps mitigate attacks by providing the following configuration elements: <allow> Element, <allowRedirectedResponses> Element, <connectionLimit> Element, <deny> Element, <executionTimeoutInSeconds> Element, <hosts> Element, <idleTimeoutInMilliSeconds> Element, <limits> Element, <maxMessageLength> Element, <receiveTimeoutInMilliSeconds> Element, and <sendTimeoutInMilliSeconds> Element. The <allowRedirectedResponses>, <executionTimeoutInMilliSeconds>, and <maxMessageLength> configuration elements can also be used to help mitigate attacks with SOAP messages sent with other protocols, such as HTTP and HTTPS.
In This Section
- How to: Send and Receive a SOAP Message By Using the SoapSender and SoapReceiver Classes
- Shows how to use the SoapSender class to send a SOAP message and how to register a SoapReceiver class by using either the TCP or HTTP protocol.
- How to: Send and Receive a SOAP Message By Using the SoapClient and SoapService Classes
- Shows how to use the SoapClient class to send a SOAP request and how to use the SoapService class to send a response.