Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

request_handler 

Apply this attribute to a class to expose it as an ATL Server request handler and enable it to handle HTTP requests.


[ request_handler(
      name,
   sdl
) ]

Parameters

name(optional)

A string specifying the name of this request handler. If not specified, the name of the class is used

sdl(optional)

A string specifying the name of the compiler-generated handler that will return the WSDL for this request handler. This parameter is only valid if the soap_handler attribute is applied to the same class.

Use the tag_name attribute on any methods of this class that you want to expose as replacement methods.

The names specified with the name and sdl parameters can be used in a server response file or a query string to refer to the request handler. For example, the following URL would return the service description for an XML Web service (soap_handler-attributed class):

http://servername/virtualpath/dllname.dll?Handler=sdl

See soap_handler for more details on the implications of using the sdl parameter.

Inheritance of request handlers and chaining of handler maps is not supported.

The request_handler attribute will usually add CRequestHandlerT as a base class. If the soap_handler attribute has been applied to this class, CSoapHandler will be added as a base class instead. If the class to which this attribute is applied already derives from IRequestHandler, then no base classes will be added.

Base class added Situation

CRequestHandlerT

request_handler attribute applied to class.

CSoapHandler

request_handler and soap_handler attributes applied to class.

None

Class already derives from IRequestHandler.

Global code added Situation

DECLARE_REQUEST_HANDLER("name", ClassName)

request_handler attribute applied to class.

HANDLER_ENTRY_SDL("name", ClassName, GenClassNameWSDL)

request_handler and soap_handler attributes applied to class, sdl parameter omitted.

HANDLER_ENTRY_SDL("name", ClassName, sdl)

request_handler and soap_handler attributes applied to class, sdl parameter specified.

Attribute Context

Applies to

coclass, class, struct

Repeatable

Yes

Required attributes

None

Invalid attributes

None

For more information about the attribute contexts, see Attribute Contexts.

Attribute Requirements

Header

atlstencil.h

Project

EXE, DLL

Compiler

/D "_ATL_ATTRIBUTES"

For more information about the meaning of the requirements, see Attribute Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.