Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Creating XML Web Services 

To create an XML Web service project

  • Create an ATL Server project as described in Creating an ATL Server Project.

    If you create the project using the ATL Server Web Service icon, an XML Web service will be added to the Web application DLL by default.

    If you create the project using the ATL Server Project icon, you can add an XML Web service to the Web application DLL by selecting Create as Web Service on the Application Options page of the wizard.

To add an XML Web service to an existing project

To implement an XML Web service

  1. Add methods to the interface in the wizard-generated header file. Use only the marshaling attributes and data types described in Supported Types in XML Web Services Created with ATL Server.

  2. Ensure that structures used in the interface methods are exported by applying the export attribute to them.

  3. Implement the interface methods in the soap_handler class in the wizard-generated header file. Add the soap_method attribute to each method to tell the compiler that it should be exposed through SOAP.

  4. If appropriate, apply the soap_header attribute to one or more SOAP methods in the class.

    Always use the memory manager returned by CSoapRootHandler::GetMemMgr to allocate memory for [out] or [in, out] parameters and SOAP headers, except BSTRs which must always be allocated with SysAllocString, CComBSTR, or a related function or class.

  5. Build the project to create the XML Web service DLL.

Example

You can find example code and further information in the following topics:

SOAP Server Code

Provides code for a simple XML Web service. Client code can be found in the SOAP Client Code topic.

Creating an XML Web Service Using ATL Server

Walks you through the creation of an XML Web service using ATL Server. For comparison, the same XML Web service is also created using Visual Basic, C#, and Managed Extensions for C++. For details, see Creating and Accessing XML Web Services Walkthroughs.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft