WsCreateServiceEndpointFromTemplate function (webservices.h)

Helper routine for creating a service endpoint (WS_SERVICE_ENDPOINT) from policy templates.

Syntax

HRESULT WsCreateServiceEndpointFromTemplate(
  WS_CHANNEL_TYPE                    channelType,
  const WS_SERVICE_ENDPOINT_PROPERTY *properties,
  ULONG                              propertyCount,
  const WS_STRING                    *addressUrl,
  const WS_SERVICE_CONTRACT          *contract,
  WS_SERVICE_SECURITY_CALLBACK       authorizationCallback,
  WS_HEAP                            *heap,
  WS_BINDING_TEMPLATE_TYPE           templateType,
  void                               *templateValue,
  ULONG                              templateSize,
  const void                         *templateDescription,
  ULONG                              templateDescriptionSize,
  WS_SERVICE_ENDPOINT                **serviceEndpoint,
  WS_ERROR                           *error
);

Parameters

channelType

A WS_CHANNEL_TYPE enumeration value representing the type of channel hosted by the endpoint.

properties

An array of WS_SERVICE_ENDPOINT_PROPERTY structures containing properties for the service endpoint. (Application should fill in channel properties in the template structure.)

propertyCount

The number of properties in the properties array.

addressUrl

The URL address on which the endpoint is to listen.

contract

A WS_SERVICE_CONTRACT structure representing the contract of the endpoint.

authorizationCallback

A WS_SERVICE_SECURITY_CALLBACK authorization callback for the service endpoint.

heap

The heap from which memory for the service endpoint is allocated on successful return.

templateType

A WS_BINDING_TEMPLATE_TYPE enumeration value representing the type of templates being used to create the service endpoint.

templateValue

Optional template structure to be created and filled in by application. The template must be consistent with the input template type (passed in the templateType parameter). When the templateValue parameter is NULL, it is equivalent to the corresponding template structure initialized to zero.

templateSize

The size, in bytes, of the input templateValue structure.

templateDescription

The description of template structure (passed in the templateValue parameter). Needs to match templateType.

templateDescriptionSize

The size of the template description.

serviceEndpoint

On success, a pointer that receives the address of the WS_SERVICE_ENDPOINT structure representing the new service endpoint.

error

Pointer to a WS_ERROR structure that receives additional error information if the function fails.

Return value

If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.

Remarks

WsCreateServiceEndpointFromTemplate creates the WS_SERVICE_ENDPOINT structure from the specified input policy templates and additional user input.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll