Visual C++ ATL Server Samples
SecureSOAP Sample: Implements a Secure SOAP Communication (HTTPS)

Demonstrates how to implement a secure SOAP communication.

The SecureSOAP sample shows how to implement a secure SOAP communication using the following:

  • A custom SSL-enabled socket class as a template parameter for CSoapSocketClientT, based on the security support provided by Windows 2000
  • The MSXML HTTP client (CSoapMSXMLInetClient)
  • The WinInet-based HTTP client (CSoapWininetClient)

Building and Running the Sample

To build the sample

  1. Open the solution file, SecureSOAP.sln, in the Visual Studio development environment.
  2. At line 57 in SecureValidationClient.cpp, replace <your_machine_name> with the name of your Web server and remove the #pragma message directive at the line above.
  3. Build the solution. This will build SecureValidation.dll, which is a combined DLL implementing the ISAPI interface, a request handler, and a SOAP handler (XML Web service).
  4. Deploy the solution manually:
    1. Create a virtual folder within IIS.
    2. Map a directory to this virtual folder.
    3. Copy SecureValidation.dll and SecureValidation.srf to that directory.
    4. Configure the "dll" and "srf" extensions to be associated with the SecureValidation.dll ISAPI extension DLL.

To set up SSL on your Web server

If you need information on setting up the SSL on your Web server, see one of the following sources:

  • If you have IIS 5, see http://localhost/iisHelp/iis/misc/default.asp and navigate in the Contents window to Administration->Server Administration->Security->Certificates->Setting Up SSL on Your Server.
  • See certReadme.txt in the SecureSOAP sample folder. This file contains a step-by-step tutorial on how to generate and install digital certificates.

To run the sample

  1. Run SecureValidationClient.exe.
  2. To check the Web page, use the following URL:
    https://<your_web_server>/<your_virtual_path>/SecureValidation.srf

    The Web page will display output showing whether communication succeeded or failed.

Requirements

  • IIS
  • SSL Certificate
  • Windows 2000 or later

Demonstrates

>CSoapSocketClientT | >CSoapMSXMLInetClient | >CSOAPWininetClient | >CSoapRootHandler::Cleanup | >CSoapSocketClientT::SetUrl

See Also

ATL Server Samples | >ATL Server | ATL Server Reference

Page view tracker