Verify SOAP Messages Signed using Username and Password
To validate digital signatures for incoming SOAP Messages created using Username Token, WSE Must be configured.
The following procedure explains how to configure a WSE to validate digital signatures created using Username Token.
1. Start Visual studio 2005
2. File Menu, New then click Project.
3. Select ASP.NET Web Service in the templates pane.
4. Add a reference to the Microsoft.Web.Services3 assembly.
5. In the Web.config file include the <SoapServerProtocolFactory> element in <webServices> section.
<configuration> <system.web> <webServices> <soapServerProtocolFactorytype="Microsoft.Web.Services3.WseProtocolFactory,Microsoft.Web.Services3,Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </webServices> </system.web> </system.web> </configuration>
Write the following code to validate the SOAP Message
Related Posts:
2 commentsSOAP Fundamentals
Introduction
SOAP is a protocol to exchange the XML messages over the network using HTTP\HTTPS.It stands for Simple Object Access Protocol.It is platform and language independent.
SOAP Building Blocks
A SOAP Message is an XML Document contains the following elements
- Envelope element which identifies the XML document as a SOAP Message.It is required element in SOAP message.
- Header element which contains the header information which is an optional element.
- Body element contains the request and response information which is a required element in SOAP.
- Fault element contains the error information during the processing of a message.
SOAP Message Syntax
<?xml version="1.0"?><soap:Envelope//Must contain SOAP envelope namespace
xmlns:soap=http://www.w3.org/2001/12/soap-envelope
//Must use SOAP encoding namepace
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header> </soap:Header>
<soap:Body> <soap:Fault> </soap:Fault> </soap:Body>
</soap:Envelope>