WsReadEndpointAddressExtension function (webservices.h)

Reads an extension of the WS_ENDPOINT_ADDRESS.

Syntax

HRESULT WsReadEndpointAddressExtension(
  [in]           WS_XML_READER                      *reader,
  [in]           WS_ENDPOINT_ADDRESS                *endpointAddress,
  [in]           WS_ENDPOINT_ADDRESS_EXTENSION_TYPE extensionType,
  [in]           WS_READ_OPTION                     readOption,
  [in]           WS_HEAP                            *heap,
                 void                               *value,
  [in]           ULONG                              valueSize,
  [in, optional] WS_ERROR                           *error
);

Parameters

[in] reader

The XML reader to use to read the extension.

The function will automatically set the input of the reader as necessary to read the extensions.

[in] endpointAddress

The endpoint address containing the extensions.

[in] extensionType

The type of extension to read.

[in] readOption

Whether the value is required, and how to allocate the value. See WS_READ_OPTION for more information.

This parameter must have one of the following values:

[in] heap

The heap to use to store the value that is read.

value

The address of a buffer to place the value read.

If using WS_READ_REQUIRED_VALUE for the readOption parameter, the buffer must be the size of the type of extension being read (which varies by WS_ENDPOINT_ADDRESS_EXTENSION_TYPE).

If using WS_READ_REQUIRED_POINTER or WS_READ_OPTIONAL_POINTER, the buffer should be the size of a pointer.

[in] valueSize

The size of the buffer that the caller has allocated for the value read.

This size should correspond to the size of the buffer passed using the value parameter.

[in, optional] error

Specifies where additional error information should be stored if the function fails.

Return value

This function can return one of these values.

Return code Description
E_INVALIDARG
The extension type was not valid.

The size of the supplied buffer was not correct.

A required parameter was NULL.

WS_E_INVALID_FORMAT
The input data was not in the expected format or did not have the expected value.
E_OUTOFMEMORY
Ran out of memory.
Other Errors
This function may return other errors not listed above.

Remarks

The returned value is valid until the heap is freed or reset.

If the requested extension type appears more than once in the extensions buffer, then the first instance is returned.

Requirements

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