#ifndef _WEBSERVICES_H
#define _WEBSERVICES_H

#if __POCC__ >= 500
#pragma once
#endif

#include <windows.h>
#include <wtypes.h>
#include <wincrypt.h>

#if defined(WIN32_DEFAULT_LIBS)
#pragma comment(lib, "webservices.lib")
#endif

#ifdef __cplusplus
extern "C"
{
#endif

#if __POCC__ >= 290
#pragma warn(push)
#pragma warn(disable:2073)
#endif

/* handles */
typedef struct _WS_XML_READER WS_XML_READER;
typedef struct _WS_XML_WRITER WS_XML_WRITER;
typedef struct _WS_XML_BUFFER WS_XML_BUFFER;
typedef struct _WS_CHANNEL WS_CHANNEL;
typedef struct _WS_OPERATION_CONTEXT WS_OPERATION_CONTEXT;
typedef struct _WS_ERROR WS_ERROR;
typedef struct _WS_HEAP WS_HEAP;
typedef struct _WS_LISTENER WS_LISTENER;
typedef struct _WS_MESSAGE WS_MESSAGE;
typedef struct _WS_SECURITY_TOKEN WS_SECURITY_TOKEN;
typedef struct _WS_SECURITY_CONTEXT WS_SECURITY_CONTEXT;
typedef struct _WS_SERVICE_HOST WS_SERVICE_HOST;
typedef struct _WS_SERVICE_PROXY WS_SERVICE_PROXY;
typedef struct _WS_METADATA WS_METADATA;
typedef struct _WS_POLICY WS_POLICY;

/* structures */
typedef struct _WS_XML_DICTIONARY WS_XML_DICTIONARY;
typedef struct _WS_XML_STRING WS_XML_STRING;
typedef struct _WS_XML_QNAME WS_XML_QNAME;
typedef struct _WS_XML_NODE_POSITION WS_XML_NODE_POSITION;
typedef struct _WS_XML_READER_PROPERTY WS_XML_READER_PROPERTY;
typedef struct _WS_XML_CANONICALIZATION_INCLUSIVE_PREFIXES WS_XML_CANONICALIZATION_INCLUSIVE_PREFIXES;
typedef struct _WS_XML_CANONICALIZATION_PROPERTY WS_XML_CANONICALIZATION_PROPERTY;
typedef struct _WS_XML_WRITER_PROPERTY WS_XML_WRITER_PROPERTY;
typedef struct _WS_XML_BUFFER_PROPERTY WS_XML_BUFFER_PROPERTY;
typedef struct _WS_XML_TEXT WS_XML_TEXT;
typedef struct _WS_XML_UTF8_TEXT WS_XML_UTF8_TEXT;
typedef struct _WS_XML_UTF16_TEXT WS_XML_UTF16_TEXT;
typedef struct _WS_XML_BASE64_TEXT WS_XML_BASE64_TEXT;
typedef struct _WS_XML_BOOL_TEXT WS_XML_BOOL_TEXT;
typedef struct _WS_XML_INT32_TEXT WS_XML_INT32_TEXT;
typedef struct _WS_XML_INT64_TEXT WS_XML_INT64_TEXT;
typedef struct _WS_XML_UINT64_TEXT WS_XML_UINT64_TEXT;
typedef struct _WS_XML_FLOAT_TEXT WS_XML_FLOAT_TEXT;
typedef struct _WS_XML_DOUBLE_TEXT WS_XML_DOUBLE_TEXT;
typedef struct _WS_XML_DECIMAL_TEXT WS_XML_DECIMAL_TEXT;
typedef struct _WS_XML_GUID_TEXT WS_XML_GUID_TEXT;
typedef struct _WS_XML_UNIQUE_ID_TEXT WS_XML_UNIQUE_ID_TEXT;
typedef struct _WS_DATETIME WS_DATETIME;
typedef struct _WS_XML_DATETIME_TEXT WS_XML_DATETIME_TEXT;
typedef struct _WS_TIMESPAN WS_TIMESPAN;
typedef struct _WS_XML_TIMESPAN_TEXT WS_XML_TIMESPAN_TEXT;
typedef struct _WS_XML_QNAME_TEXT WS_XML_QNAME_TEXT;
typedef struct _WS_XML_LIST_TEXT WS_XML_LIST_TEXT;
typedef struct _WS_XML_NODE WS_XML_NODE;
typedef struct _WS_XML_ATTRIBUTE WS_XML_ATTRIBUTE;
typedef struct _WS_XML_ELEMENT_NODE WS_XML_ELEMENT_NODE;
typedef struct _WS_XML_TEXT_NODE WS_XML_TEXT_NODE;
typedef struct _WS_XML_COMMENT_NODE WS_XML_COMMENT_NODE;
typedef struct _WS_XML_READER_INPUT WS_XML_READER_INPUT;
typedef struct _WS_XML_READER_BUFFER_INPUT WS_XML_READER_BUFFER_INPUT;
typedef struct _WS_XML_READER_STREAM_INPUT WS_XML_READER_STREAM_INPUT;
typedef struct _WS_XML_READER_ENCODING WS_XML_READER_ENCODING;
typedef struct _WS_XML_READER_TEXT_ENCODING WS_XML_READER_TEXT_ENCODING;
typedef struct _WS_XML_READER_BINARY_ENCODING WS_XML_READER_BINARY_ENCODING;
typedef struct _WS_STRING WS_STRING;
typedef struct _WS_XML_READER_MTOM_ENCODING WS_XML_READER_MTOM_ENCODING;
typedef struct _WS_XML_READER_RAW_ENCODING WS_XML_READER_RAW_ENCODING;
typedef struct _WS_XML_WRITER_ENCODING WS_XML_WRITER_ENCODING;
typedef struct _WS_XML_WRITER_TEXT_ENCODING WS_XML_WRITER_TEXT_ENCODING;
typedef struct _WS_XML_WRITER_BINARY_ENCODING WS_XML_WRITER_BINARY_ENCODING;
typedef struct _WS_XML_WRITER_MTOM_ENCODING WS_XML_WRITER_MTOM_ENCODING;
typedef struct _WS_XML_WRITER_RAW_ENCODING WS_XML_WRITER_RAW_ENCODING;
typedef struct _WS_XML_WRITER_OUTPUT WS_XML_WRITER_OUTPUT;
typedef struct _WS_XML_WRITER_BUFFER_OUTPUT WS_XML_WRITER_BUFFER_OUTPUT;
typedef struct _WS_XML_WRITER_STREAM_OUTPUT WS_XML_WRITER_STREAM_OUTPUT;
typedef struct _WS_XML_WRITER_PROPERTIES WS_XML_WRITER_PROPERTIES;
typedef struct _WS_XML_READER_PROPERTIES WS_XML_READER_PROPERTIES;
typedef struct _WS_ASYNC_CONTEXT WS_ASYNC_CONTEXT;
typedef struct _WS_ASYNC_STATE WS_ASYNC_STATE;
typedef struct _WS_ASYNC_OPERATION WS_ASYNC_OPERATION;
typedef struct _WS_CHANNEL_PROPERTY WS_CHANNEL_PROPERTY;
typedef struct _WS_CUSTOM_HTTP_PROXY WS_CUSTOM_HTTP_PROXY;
typedef struct _WS_CHANNEL_PROPERTIES WS_CHANNEL_PROPERTIES;
typedef struct _WS_CUSTOM_CHANNEL_CALLBACKS WS_CUSTOM_CHANNEL_CALLBACKS;
typedef struct _WS_HTTP_HEADER_MAPPING WS_HTTP_HEADER_MAPPING;
typedef struct _WS_HTTP_MESSAGE_MAPPING WS_HTTP_MESSAGE_MAPPING;
typedef struct _WS_ELEMENT_DESCRIPTION WS_ELEMENT_DESCRIPTION;
typedef struct _WS_MESSAGE_DESCRIPTION WS_MESSAGE_DESCRIPTION;
typedef struct _WS_CHANNEL_ENCODER WS_CHANNEL_ENCODER;
typedef struct _WS_CHANNEL_DECODER WS_CHANNEL_DECODER;
typedef struct _WS_HTTP_REDIRECT_CALLBACK_CONTEXT WS_HTTP_REDIRECT_CALLBACK_CONTEXT;
typedef struct _WS_ENDPOINT_IDENTITY WS_ENDPOINT_IDENTITY;
typedef struct _WS_ENDPOINT_ADDRESS WS_ENDPOINT_ADDRESS;
typedef struct _WS_DNS_ENDPOINT_IDENTITY WS_DNS_ENDPOINT_IDENTITY;
typedef struct _WS_UPN_ENDPOINT_IDENTITY WS_UPN_ENDPOINT_IDENTITY;
typedef struct _WS_SPN_ENDPOINT_IDENTITY WS_SPN_ENDPOINT_IDENTITY;
typedef struct _WS_BYTES WS_BYTES;
typedef struct _WS_RSA_ENDPOINT_IDENTITY WS_RSA_ENDPOINT_IDENTITY;
typedef struct _WS_CERT_ENDPOINT_IDENTITY WS_CERT_ENDPOINT_IDENTITY;
typedef struct _WS_UNKNOWN_ENDPOINT_IDENTITY WS_UNKNOWN_ENDPOINT_IDENTITY;
typedef struct _WS_ERROR_PROPERTY WS_ERROR_PROPERTY;
typedef struct _WS_FAULT_REASON WS_FAULT_REASON;
typedef struct _WS_FAULT_CODE WS_FAULT_CODE;
typedef struct _WS_FAULT WS_FAULT;
typedef struct _WS_FAULT_DETAIL_DESCRIPTION WS_FAULT_DETAIL_DESCRIPTION;
typedef struct _WS_HEAP_PROPERTY WS_HEAP_PROPERTY;
typedef struct _WS_HEAP_PROPERTIES WS_HEAP_PROPERTIES;
typedef struct _WS_LISTENER_PROPERTY WS_LISTENER_PROPERTY;
typedef struct _WS_DISALLOWED_USER_AGENT_SUBSTRINGS WS_DISALLOWED_USER_AGENT_SUBSTRINGS;
typedef struct _WS_LISTENER_PROPERTIES WS_LISTENER_PROPERTIES;
typedef struct _WS_HOST_NAMES WS_HOST_NAMES;
typedef struct _WS_CUSTOM_LISTENER_CALLBACKS WS_CUSTOM_LISTENER_CALLBACKS;
typedef struct _WS_MESSAGE_PROPERTY WS_MESSAGE_PROPERTY;
typedef struct _WS_MESSAGE_PROPERTIES WS_MESSAGE_PROPERTIES;
typedef struct _WS_SECURITY_ALGORITHM_PROPERTY WS_SECURITY_ALGORITHM_PROPERTY;
typedef struct _WS_SECURITY_ALGORITHM_SUITE WS_SECURITY_ALGORITHM_SUITE;
typedef struct _WS_SECURITY_PROPERTY WS_SECURITY_PROPERTY;
typedef struct _WS_SECURITY_PROPERTIES WS_SECURITY_PROPERTIES;
typedef struct _WS_SECURITY_BINDING_PROPERTY WS_SECURITY_BINDING_PROPERTY;
typedef struct _WS_SECURITY_BINDING_PROPERTIES WS_SECURITY_BINDING_PROPERTIES;
typedef struct _WS_SERVICE_SECURITY_IDENTITIES WS_SERVICE_SECURITY_IDENTITIES;
typedef struct _WS_CERT_CREDENTIAL WS_CERT_CREDENTIAL;
typedef struct _WS_SUBJECT_NAME_CERT_CREDENTIAL WS_SUBJECT_NAME_CERT_CREDENTIAL;
typedef struct _WS_THUMBPRINT_CERT_CREDENTIAL WS_THUMBPRINT_CERT_CREDENTIAL;
typedef struct _WS_CUSTOM_CERT_CREDENTIAL WS_CUSTOM_CERT_CREDENTIAL;
typedef struct _WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL;
typedef struct _WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL;
typedef struct _WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL;
typedef struct _WS_OPAQUE_WINDOWS_INTEGRATED_AUTH_CREDENTIAL WS_OPAQUE_WINDOWS_INTEGRATED_AUTH_CREDENTIAL;
typedef struct _WS_USERNAME_CREDENTIAL WS_USERNAME_CREDENTIAL;
typedef struct _WS_STRING_USERNAME_CREDENTIAL WS_STRING_USERNAME_CREDENTIAL;
typedef struct _WS_SECURITY_KEY_HANDLE WS_SECURITY_KEY_HANDLE;
typedef struct _WS_RAW_SYMMETRIC_SECURITY_KEY_HANDLE WS_RAW_SYMMETRIC_SECURITY_KEY_HANDLE;
typedef struct _WS_NCRYPT_ASYMMETRIC_SECURITY_KEY_HANDLE WS_NCRYPT_ASYMMETRIC_SECURITY_KEY_HANDLE;
typedef struct _WS_CAPI_ASYMMETRIC_SECURITY_KEY_HANDLE WS_CAPI_ASYMMETRIC_SECURITY_KEY_HANDLE;
typedef struct _WS_SECURITY_BINDING WS_SECURITY_BINDING;
typedef struct _WS_SSL_TRANSPORT_SECURITY_BINDING WS_SSL_TRANSPORT_SECURITY_BINDING;
typedef struct _WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING;
typedef struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING WS_HTTP_HEADER_AUTH_SECURITY_BINDING;
typedef struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING;
typedef struct _WS_USERNAME_MESSAGE_SECURITY_BINDING WS_USERNAME_MESSAGE_SECURITY_BINDING;
typedef struct _WS_SECURITY_DESCRIPTION WS_SECURITY_DESCRIPTION;
typedef struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING;
typedef struct _WS_SECURITY_CONTEXT_PROPERTY WS_SECURITY_CONTEXT_PROPERTY;
typedef struct _WS_XML_SECURITY_TOKEN_PROPERTY WS_XML_SECURITY_TOKEN_PROPERTY;
typedef struct _WS_XML_TOKEN_MESSAGE_SECURITY_BINDING WS_XML_TOKEN_MESSAGE_SECURITY_BINDING;
typedef struct _WS_SAML_AUTHENTICATOR WS_SAML_AUTHENTICATOR;
typedef struct _WS_CERT_SIGNED_SAML_AUTHENTICATOR WS_CERT_SIGNED_SAML_AUTHENTICATOR;
typedef struct _WS_SAML_MESSAGE_SECURITY_BINDING WS_SAML_MESSAGE_SECURITY_BINDING;
typedef struct _WS_REQUEST_SECURITY_TOKEN_PROPERTY WS_REQUEST_SECURITY_TOKEN_PROPERTY;
typedef struct _WS_ANY_ATTRIBUTE WS_ANY_ATTRIBUTE;
typedef struct _WS_ANY_ATTRIBUTES WS_ANY_ATTRIBUTES;
typedef struct _WS_BOOL_DESCRIPTION WS_BOOL_DESCRIPTION;
typedef struct _WS_GUID_DESCRIPTION WS_GUID_DESCRIPTION;
typedef struct _WS_DATETIME_DESCRIPTION WS_DATETIME_DESCRIPTION;
typedef struct _WS_DURATION WS_DURATION;
typedef struct _WS_DURATION_DESCRIPTION WS_DURATION_DESCRIPTION;
typedef struct _WS_TIMESPAN_DESCRIPTION WS_TIMESPAN_DESCRIPTION;
typedef struct _WS_UNIQUE_ID_DESCRIPTION WS_UNIQUE_ID_DESCRIPTION;
typedef struct _WS_STRING_DESCRIPTION WS_STRING_DESCRIPTION;
typedef struct _WS_XML_STRING_DESCRIPTION WS_XML_STRING_DESCRIPTION;
typedef struct _WS_XML_QNAME_DESCRIPTION WS_XML_QNAME_DESCRIPTION;
typedef struct _WS_CHAR_ARRAY_DESCRIPTION WS_CHAR_ARRAY_DESCRIPTION;
typedef struct _WS_BYTE_ARRAY_DESCRIPTION WS_BYTE_ARRAY_DESCRIPTION;
typedef struct _WS_UTF8_ARRAY_DESCRIPTION WS_UTF8_ARRAY_DESCRIPTION;
typedef struct _WS_WSZ_DESCRIPTION WS_WSZ_DESCRIPTION;
typedef struct _WS_INT8_DESCRIPTION WS_INT8_DESCRIPTION;
typedef struct _WS_UINT8_DESCRIPTION WS_UINT8_DESCRIPTION;
typedef struct _WS_INT16_DESCRIPTION WS_INT16_DESCRIPTION;
typedef struct _WS_UINT16_DESCRIPTION WS_UINT16_DESCRIPTION;
typedef struct _WS_INT32_DESCRIPTION WS_INT32_DESCRIPTION;
typedef struct _WS_UINT32_DESCRIPTION WS_UINT32_DESCRIPTION;
typedef struct _WS_INT64_DESCRIPTION WS_INT64_DESCRIPTION;
typedef struct _WS_UINT64_DESCRIPTION WS_UINT64_DESCRIPTION;
typedef struct _WS_FLOAT_DESCRIPTION WS_FLOAT_DESCRIPTION;
typedef struct _WS_DOUBLE_DESCRIPTION WS_DOUBLE_DESCRIPTION;
typedef struct _WS_DECIMAL_DESCRIPTION WS_DECIMAL_DESCRIPTION;
typedef struct _WS_BYTES_DESCRIPTION WS_BYTES_DESCRIPTION;
typedef struct _WS_ENUM_VALUE WS_ENUM_VALUE;
typedef struct _WS_ENUM_DESCRIPTION WS_ENUM_DESCRIPTION;
typedef struct _WS_ITEM_RANGE WS_ITEM_RANGE;
typedef struct _WS_DEFAULT_VALUE WS_DEFAULT_VALUE;
typedef struct _WS_FIELD_DESCRIPTION WS_FIELD_DESCRIPTION;
typedef struct _WS_UNION_FIELD_DESCRIPTION WS_UNION_FIELD_DESCRIPTION;
typedef struct _WS_STRUCT_DESCRIPTION WS_STRUCT_DESCRIPTION;
typedef struct _WS_UNION_DESCRIPTION WS_UNION_DESCRIPTION;
typedef struct _WS_ENDPOINT_ADDRESS_DESCRIPTION WS_ENDPOINT_ADDRESS_DESCRIPTION;
typedef struct _WS_FAULT_DESCRIPTION WS_FAULT_DESCRIPTION;
typedef struct _WS_VOID_DESCRIPTION WS_VOID_DESCRIPTION;
typedef struct _WS_CUSTOM_TYPE_DESCRIPTION WS_CUSTOM_TYPE_DESCRIPTION;
typedef struct _WS_ATTRIBUTE_DESCRIPTION WS_ATTRIBUTE_DESCRIPTION;
typedef struct _WS_PARAMETER_DESCRIPTION WS_PARAMETER_DESCRIPTION;
typedef struct _WS_OPERATION_DESCRIPTION WS_OPERATION_DESCRIPTION;
typedef struct _WS_CONTRACT_DESCRIPTION WS_CONTRACT_DESCRIPTION;
typedef struct _WS_SERVICE_CONTRACT WS_SERVICE_CONTRACT;
typedef struct _WS_SERVICE_PROPERTY WS_SERVICE_PROPERTY;
typedef struct _WS_SERVICE_ENDPOINT_PROPERTY WS_SERVICE_ENDPOINT_PROPERTY;
typedef struct _WS_SERVICE_PROPERTY_ACCEPT_CALLBACK WS_SERVICE_PROPERTY_ACCEPT_CALLBACK;
typedef struct _WS_SERVICE_METADATA_DOCUMENT WS_SERVICE_METADATA_DOCUMENT;
typedef struct _WS_SERVICE_METADATA WS_SERVICE_METADATA;
typedef struct _WS_SERVICE_PROPERTY_CLOSE_CALLBACK WS_SERVICE_PROPERTY_CLOSE_CALLBACK;
typedef struct _WS_SERVICE_ENDPOINT_METADATA WS_SERVICE_ENDPOINT_METADATA;
typedef struct _WS_SERVICE_ENDPOINT WS_SERVICE_ENDPOINT;
typedef struct _WS_PROXY_PROPERTY WS_PROXY_PROPERTY;
typedef struct _WS_PROXY_MESSAGE_CALLBACK_CONTEXT WS_PROXY_MESSAGE_CALLBACK_CONTEXT;
typedef struct _WS_CALL_PROPERTY WS_CALL_PROPERTY;
typedef struct _WS_URL WS_URL;
typedef struct _WS_HTTP_URL WS_HTTP_URL;
typedef struct _WS_HTTPS_URL WS_HTTPS_URL;
typedef struct _WS_NETTCP_URL WS_NETTCP_URL;
typedef struct _WS_SOAPUDP_URL WS_SOAPUDP_URL;
typedef struct _WS_UNIQUE_ID WS_UNIQUE_ID;
typedef struct _WS_BUFFERS WS_BUFFERS;
typedef struct _WS_METADATA_ENDPOINT WS_METADATA_ENDPOINT;
typedef struct _WS_METADATA_ENDPOINTS WS_METADATA_ENDPOINTS;
typedef struct _WS_METADATA_PROPERTY WS_METADATA_PROPERTY;
typedef struct _WS_POLICY_PROPERTY WS_POLICY_PROPERTY;
typedef struct _WS_POLICY_PROPERTIES WS_POLICY_PROPERTIES;
typedef struct _WS_SECURITY_BINDING_PROPERTY_CONSTRAINT WS_SECURITY_BINDING_PROPERTY_CONSTRAINT;
typedef struct _WS_SECURITY_BINDING_CONSTRAINT WS_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_SSL_TRANSPORT_SECURITY_BINDING_CONSTRAINT WS_SSL_TRANSPORT_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_USERNAME_MESSAGE_SECURITY_BINDING_CONSTRAINT WS_USERNAME_MESSAGE_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING_CONSTRAINT WS_HTTP_HEADER_AUTH_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_CONSTRAINT WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_CERT_MESSAGE_SECURITY_BINDING_CONSTRAINT WS_CERT_MESSAGE_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_CONSTRAINT WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_REQUEST_SECURITY_TOKEN_PROPERTY_CONSTRAINT WS_REQUEST_SECURITY_TOKEN_PROPERTY_CONSTRAINT;
typedef struct _WS_ISSUED_TOKEN_MESSAGE_SECURITY_BINDING_CONSTRAINT WS_ISSUED_TOKEN_MESSAGE_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_SECURITY_PROPERTY_CONSTRAINT WS_SECURITY_PROPERTY_CONSTRAINT;
typedef struct _WS_SECURITY_CONSTRAINTS WS_SECURITY_CONSTRAINTS;
typedef struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_CONSTRAINT WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_CONSTRAINT;
typedef struct _WS_CHANNEL_PROPERTY_CONSTRAINT WS_CHANNEL_PROPERTY_CONSTRAINT;
typedef struct _WS_POLICY_EXTENSION WS_POLICY_EXTENSION;
typedef struct _WS_ENDPOINT_POLICY_EXTENSION WS_ENDPOINT_POLICY_EXTENSION;
typedef struct _WS_POLICY_CONSTRAINTS WS_POLICY_CONSTRAINTS;
typedef struct _WS_HTTP_POLICY_DESCRIPTION WS_HTTP_POLICY_DESCRIPTION;
typedef struct _WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_SSL_POLICY_DESCRIPTION WS_HTTP_SSL_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING_POLICY_DESCRIPTION WS_HTTP_HEADER_AUTH_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_HEADER_AUTH_POLICY_DESCRIPTION WS_HTTP_HEADER_AUTH_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_SSL_HEADER_AUTH_POLICY_DESCRIPTION WS_HTTP_SSL_HEADER_AUTH_POLICY_DESCRIPTION;
typedef struct _WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_SSL_USERNAME_POLICY_DESCRIPTION WS_HTTP_SSL_USERNAME_POLICY_DESCRIPTION;
typedef struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_SSL_KERBEROS_APREQ_POLICY_DESCRIPTION WS_HTTP_SSL_KERBEROS_APREQ_POLICY_DESCRIPTION;
typedef struct _WS_TCP_POLICY_DESCRIPTION WS_TCP_POLICY_DESCRIPTION;
typedef struct _WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_TCP_SSPI_POLICY_DESCRIPTION WS_TCP_SSPI_POLICY_DESCRIPTION;
typedef struct _WS_TCP_SSPI_USERNAME_POLICY_DESCRIPTION WS_TCP_SSPI_USERNAME_POLICY_DESCRIPTION;
typedef struct _WS_TCP_SSPI_KERBEROS_APREQ_POLICY_DESCRIPTION WS_TCP_SSPI_KERBEROS_APREQ_POLICY_DESCRIPTION;
typedef struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION;
typedef struct _WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION;
typedef struct _WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION;
typedef struct _WS_HTTP_BINDING_TEMPLATE WS_HTTP_BINDING_TEMPLATE;
typedef struct _WS_TCP_BINDING_TEMPLATE WS_TCP_BINDING_TEMPLATE;
typedef struct _WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_HTTP_SSL_BINDING_TEMPLATE WS_HTTP_SSL_BINDING_TEMPLATE;
typedef struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TEMPLATE WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_HTTP_HEADER_AUTH_BINDING_TEMPLATE WS_HTTP_HEADER_AUTH_BINDING_TEMPLATE;
typedef struct _WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_TCP_SSPI_BINDING_TEMPLATE WS_TCP_SSPI_BINDING_TEMPLATE;
typedef struct _WS_HTTP_SSL_HEADER_AUTH_BINDING_TEMPLATE WS_HTTP_SSL_HEADER_AUTH_BINDING_TEMPLATE;
typedef struct _WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE;
typedef struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_HTTP_SSL_KERBEROS_APREQ_BINDING_TEMPLATE WS_HTTP_SSL_KERBEROS_APREQ_BINDING_TEMPLATE;
typedef struct _WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE;
typedef struct _WS_TCP_SSPI_KERBEROS_APREQ_BINDING_TEMPLATE WS_TCP_SSPI_KERBEROS_APREQ_BINDING_TEMPLATE;
typedef struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_TEMPLATE WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE;
typedef struct _WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE;
typedef struct _WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE;
typedef struct _WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE;
typedef struct _WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE;

/* enumerations */

typedef enum {
    WS_XML_READER_PROPERTY_MAX_DEPTH = 0,
    WS_XML_READER_PROPERTY_ALLOW_FRAGMENT = 1,
    WS_XML_READER_PROPERTY_MAX_ATTRIBUTES = 2,
    WS_XML_READER_PROPERTY_READ_DECLARATION = 3,
    WS_XML_READER_PROPERTY_CHARSET = 4,
    WS_XML_READER_PROPERTY_ROW = 5,
    WS_XML_READER_PROPERTY_COLUMN = 6,
    WS_XML_READER_PROPERTY_UTF8_TRIM_SIZE = 7,
    WS_XML_READER_PROPERTY_STREAM_BUFFER_SIZE = 8,
    WS_XML_READER_PROPERTY_IN_ATTRIBUTE = 9,
    WS_XML_READER_PROPERTY_STREAM_MAX_ROOT_MIME_PART_SIZE = 10,
    WS_XML_READER_PROPERTY_STREAM_MAX_MIME_HEADERS_SIZE = 11,
    WS_XML_READER_PROPERTY_MAX_MIME_PARTS = 12,
    WS_XML_READER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES = 13,
    WS_XML_READER_PROPERTY_MAX_NAMESPACES = 14,
} WS_XML_READER_PROPERTY_ID;

typedef enum {
    WS_EXCLUSIVE_XML_CANONICALIZATION_ALGORITHM = 0,
    WS_EXCLUSIVE_WITH_COMMENTS_XML_CANONICALIZATION_ALGORITHM = 1,
    WS_INCLUSIVE_XML_CANONICALIZATION_ALGORITHM = 2,
    WS_INCLUSIVE_WITH_COMMENTS_XML_CANONICALIZATION_ALGORITHM = 3,
} WS_XML_CANONICALIZATION_ALGORITHM;

typedef enum {
    WS_XML_CANONICALIZATION_PROPERTY_ALGORITHM = 0,
    WS_XML_CANONICALIZATION_PROPERTY_INCLUSIVE_PREFIXES = 1,
    WS_XML_CANONICALIZATION_PROPERTY_OMITTED_ELEMENT = 2,
    WS_XML_CANONICALIZATION_PROPERTY_OUTPUT_BUFFER_SIZE = 3,
} WS_XML_CANONICALIZATION_PROPERTY_ID;

typedef enum {
    WS_XML_WRITER_PROPERTY_MAX_DEPTH = 0,
    WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT = 1,
    WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES = 2,
    WS_XML_WRITER_PROPERTY_WRITE_DECLARATION = 3,
    WS_XML_WRITER_PROPERTY_INDENT = 4,
    WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE = 5,
    WS_XML_WRITER_PROPERTY_CHARSET = 6,
    WS_XML_WRITER_PROPERTY_BUFFERS = 7,
    WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE = 8,
    WS_XML_WRITER_PROPERTY_BYTES = 9,
    WS_XML_WRITER_PROPERTY_IN_ATTRIBUTE = 10,
    WS_XML_WRITER_PROPERTY_MAX_MIME_PARTS_BUFFER_SIZE = 11,
    WS_XML_WRITER_PROPERTY_INITIAL_BUFFER = 12,
    WS_XML_WRITER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES = 13,
    WS_XML_WRITER_PROPERTY_MAX_NAMESPACES = 14,
    WS_XML_WRITER_PROPERTY_BYTES_WRITTEN = 15,
    WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE = 16,
    WS_XML_WRITER_PROPERTY_COMPRESS_EMPTY_ELEMENTS = 17,
} WS_XML_WRITER_PROPERTY_ID;

typedef enum {
    MORE_BILL_GATES = -1,
} WS_XML_BUFFER_PROPERTY_ID;

typedef enum {
    WS_XML_TEXT_TYPE_UTF8 = 1,
    WS_XML_TEXT_TYPE_UTF16 = 2,
    WS_XML_TEXT_TYPE_BASE64 = 3,
    WS_XML_TEXT_TYPE_BOOL = 4,
    WS_XML_TEXT_TYPE_INT32 = 5,
    WS_XML_TEXT_TYPE_INT64 = 6,
    WS_XML_TEXT_TYPE_UINT64 = 7,
    WS_XML_TEXT_TYPE_FLOAT = 8,
    WS_XML_TEXT_TYPE_DOUBLE = 9,
    WS_XML_TEXT_TYPE_DECIMAL = 10,
    WS_XML_TEXT_TYPE_GUID = 11,
    WS_XML_TEXT_TYPE_UNIQUE_ID = 12,
    WS_XML_TEXT_TYPE_DATETIME = 13,
    WS_XML_TEXT_TYPE_TIMESPAN = 14,
    WS_XML_TEXT_TYPE_QNAME = 15,
    WS_XML_TEXT_TYPE_LIST = 16,
} WS_XML_TEXT_TYPE;

typedef enum {
    WS_XML_NODE_TYPE_ELEMENT = 1,
    WS_XML_NODE_TYPE_TEXT = 2,
    WS_XML_NODE_TYPE_END_ELEMENT = 3,
    WS_XML_NODE_TYPE_COMMENT = 4,
    WS_XML_NODE_TYPE_CDATA = 6,
    WS_XML_NODE_TYPE_END_CDATA = 7,
    WS_XML_NODE_TYPE_EOF = 8,
    WS_XML_NODE_TYPE_BOF = 9,
} WS_XML_NODE_TYPE;

typedef enum {
    WS_MOVE_TO_ROOT_ELEMENT = 0,
    WS_MOVE_TO_NEXT_ELEMENT = 1,
    WS_MOVE_TO_PREVIOUS_ELEMENT = 2,
    WS_MOVE_TO_CHILD_ELEMENT = 3,
    WS_MOVE_TO_END_ELEMENT = 4,
    WS_MOVE_TO_PARENT_ELEMENT = 5,
    WS_MOVE_TO_NEXT_NODE = 6,
    WS_MOVE_TO_PREVIOUS_NODE = 7,
    WS_MOVE_TO_FIRST_NODE = 8,
    WS_MOVE_TO_BOF = 9,
    WS_MOVE_TO_EOF = 10,
    WS_MOVE_TO_CHILD_NODE = 11,
} WS_MOVE_TO;

typedef enum {
    WS_BOOL_VALUE_TYPE = 0,
    WS_INT8_VALUE_TYPE = 1,
    WS_INT16_VALUE_TYPE = 2,
    WS_INT32_VALUE_TYPE = 3,
    WS_INT64_VALUE_TYPE = 4,
    WS_UINT8_VALUE_TYPE = 5,
    WS_UINT16_VALUE_TYPE = 6,
    WS_UINT32_VALUE_TYPE = 7,
    WS_UINT64_VALUE_TYPE = 8,
    WS_FLOAT_VALUE_TYPE = 9,
    WS_DOUBLE_VALUE_TYPE = 10,
    WS_DECIMAL_VALUE_TYPE = 11,
    WS_DATETIME_VALUE_TYPE = 12,
    WS_TIMESPAN_VALUE_TYPE = 13,
    WS_GUID_VALUE_TYPE = 14,
    WS_DURATION_VALUE_TYPE = 15,
} WS_VALUE_TYPE;

typedef enum {
    WS_XML_READER_INPUT_TYPE_BUFFER = 1,
    WS_XML_READER_INPUT_TYPE_STREAM = 2,
} WS_XML_READER_INPUT_TYPE;

typedef enum {
    WS_XML_READER_ENCODING_TYPE_TEXT = 1,
    WS_XML_READER_ENCODING_TYPE_BINARY = 2,
    WS_XML_READER_ENCODING_TYPE_MTOM = 3,
    WS_XML_READER_ENCODING_TYPE_RAW = 4,
} WS_XML_READER_ENCODING_TYPE;

typedef enum {
    WS_CHARSET_AUTO = 0,
    WS_CHARSET_UTF8 = 1,
    WS_CHARSET_UTF16LE = 2,
    WS_CHARSET_UTF16BE = 3,
} WS_CHARSET;

typedef enum {
    WS_XML_WRITER_ENCODING_TYPE_TEXT = 1,
    WS_XML_WRITER_ENCODING_TYPE_BINARY = 2,
    WS_XML_WRITER_ENCODING_TYPE_MTOM = 3,
    WS_XML_WRITER_ENCODING_TYPE_RAW = 4,
} WS_XML_WRITER_ENCODING_TYPE;

typedef enum {
    WS_XML_WRITER_OUTPUT_TYPE_BUFFER = 1,
    WS_XML_WRITER_OUTPUT_TYPE_STREAM = 2,
} WS_XML_WRITER_OUTPUT_TYPE;

typedef enum {
    WS_SHORT_CALLBACK = 0,
    WS_LONG_CALLBACK = 1,
} WS_CALLBACK_MODEL;

typedef enum {
    WS_ENCODING_XML_BINARY_1 = 0,
    WS_ENCODING_XML_BINARY_SESSION_1 = 1,
    WS_ENCODING_XML_MTOM_UTF8 = 2,
    WS_ENCODING_XML_MTOM_UTF16BE = 3,
    WS_ENCODING_XML_MTOM_UTF16LE = 4,
    WS_ENCODING_XML_UTF8 = 5,
    WS_ENCODING_XML_UTF16BE = 6,
    WS_ENCODING_XML_UTF16LE = 7,
    WS_ENCODING_RAW = 8,
} WS_ENCODING;

typedef enum {
    WS_CHANNEL_STATE_CREATED = 0,
    WS_CHANNEL_STATE_OPENING = 1,
    WS_CHANNEL_STATE_ACCEPTING = 2,
    WS_CHANNEL_STATE_OPEN = 3,
    WS_CHANNEL_STATE_FAULTED = 4,
    WS_CHANNEL_STATE_CLOSING = 5,
    WS_CHANNEL_STATE_CLOSED = 6,
} WS_CHANNEL_STATE;

typedef enum {
    WS_RECEIVE_REQUIRED_MESSAGE = 1,
    WS_RECEIVE_OPTIONAL_MESSAGE = 2,
} WS_RECEIVE_OPTION;

typedef enum {
    WS_HTTP_CHANNEL_BINDING = 0,
    WS_TCP_CHANNEL_BINDING = 1,
    WS_UDP_CHANNEL_BINDING = 2,
    WS_CUSTOM_CHANNEL_BINDING = 3,
} WS_CHANNEL_BINDING;

typedef enum {
    WS_CHANNEL_TYPE_INPUT = 0x1,
    WS_CHANNEL_TYPE_OUTPUT = 0x2,
    WS_CHANNEL_TYPE_SESSION = 0x4,
    WS_CHANNEL_TYPE_INPUT_SESSION = (WS_CHANNEL_TYPE_INPUT | WS_CHANNEL_TYPE_SESSION),
    WS_CHANNEL_TYPE_OUTPUT_SESSION = (WS_CHANNEL_TYPE_OUTPUT | WS_CHANNEL_TYPE_SESSION),
    WS_CHANNEL_TYPE_DUPLEX = (WS_CHANNEL_TYPE_INPUT | WS_CHANNEL_TYPE_OUTPUT),
    WS_CHANNEL_TYPE_DUPLEX_SESSION = (WS_CHANNEL_TYPE_INPUT | WS_CHANNEL_TYPE_OUTPUT | WS_CHANNEL_TYPE_SESSION),
    WS_CHANNEL_TYPE_REQUEST = 0x8,
    WS_CHANNEL_TYPE_REPLY = 0x10,
} WS_CHANNEL_TYPE;

typedef enum {
    WS_STREAMED_INPUT_TRANSFER_MODE = 0x1,
    WS_STREAMED_OUTPUT_TRANSFER_MODE = 0x2,
    WS_BUFFERED_TRANSFER_MODE = 0x0,
    WS_STREAMED_TRANSFER_MODE = (WS_STREAMED_INPUT_TRANSFER_MODE | WS_STREAMED_OUTPUT_TRANSFER_MODE),
} WS_TRANSFER_MODE;

typedef enum {
    WS_HTTP_PROXY_SETTING_MODE_AUTO = 0x1,
    WS_HTTP_PROXY_SETTING_MODE_NONE = 0x2,
    WS_HTTP_PROXY_SETTING_MODE_CUSTOM = 0x3,
} WS_HTTP_PROXY_SETTING_MODE;

typedef enum {
    WS_CHANNEL_PROPERTY_MAX_BUFFERED_MESSAGE_SIZE = 0,
    WS_CHANNEL_PROPERTY_MAX_STREAMED_MESSAGE_SIZE = 1,
    WS_CHANNEL_PROPERTY_MAX_STREAMED_START_SIZE = 2,
    WS_CHANNEL_PROPERTY_MAX_STREAMED_FLUSH_SIZE = 3,
    WS_CHANNEL_PROPERTY_ENCODING = 4,
    WS_CHANNEL_PROPERTY_ENVELOPE_VERSION = 5,
    WS_CHANNEL_PROPERTY_ADDRESSING_VERSION = 6,
    WS_CHANNEL_PROPERTY_MAX_SESSION_DICTIONARY_SIZE = 7,
    WS_CHANNEL_PROPERTY_STATE = 8,
    WS_CHANNEL_PROPERTY_ASYNC_CALLBACK_MODEL = 9,
    WS_CHANNEL_PROPERTY_IP_VERSION = 10,
    WS_CHANNEL_PROPERTY_RESOLVE_TIMEOUT = 11,
    WS_CHANNEL_PROPERTY_CONNECT_TIMEOUT = 12,
    WS_CHANNEL_PROPERTY_SEND_TIMEOUT = 13,
    WS_CHANNEL_PROPERTY_RECEIVE_RESPONSE_TIMEOUT = 14,
    WS_CHANNEL_PROPERTY_RECEIVE_TIMEOUT = 15,
    WS_CHANNEL_PROPERTY_CLOSE_TIMEOUT = 16,
    WS_CHANNEL_PROPERTY_ENABLE_TIMEOUTS = 17,
    WS_CHANNEL_PROPERTY_TRANSFER_MODE = 18,
    WS_CHANNEL_PROPERTY_MULTICAST_INTERFACE = 19,
    WS_CHANNEL_PROPERTY_MULTICAST_HOPS = 20,
    WS_CHANNEL_PROPERTY_REMOTE_ADDRESS = 21,
    WS_CHANNEL_PROPERTY_REMOTE_IP_ADDRESS = 22,
    WS_CHANNEL_PROPERTY_HTTP_CONNECTION_ID = 23,
    WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_CALLBACKS = 24,
    WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS = 25,
    WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_INSTANCE = 26,
    WS_CHANNEL_PROPERTY_TRANSPORT_URL = 27,
    WS_CHANNEL_PROPERTY_NO_DELAY = 28,
    WS_CHANNEL_PROPERTY_SEND_KEEP_ALIVES = 29,
    WS_CHANNEL_PROPERTY_KEEP_ALIVE_TIME = 30,
    WS_CHANNEL_PROPERTY_KEEP_ALIVE_INTERVAL = 31,
    WS_CHANNEL_PROPERTY_MAX_HTTP_SERVER_CONNECTIONS = 32,
    WS_CHANNEL_PROPERTY_IS_SESSION_SHUT_DOWN = 33,
    WS_CHANNEL_PROPERTY_CHANNEL_TYPE = 34,
    WS_CHANNEL_PROPERTY_TRIM_BUFFERED_MESSAGE_SIZE = 35,
    WS_CHANNEL_PROPERTY_ENCODER = 36,
    WS_CHANNEL_PROPERTY_DECODER = 37,
    WS_CHANNEL_PROPERTY_PROTECTION_LEVEL = 38,
    WS_CHANNEL_PROPERTY_COOKIE_MODE = 39,
    WS_CHANNEL_PROPERTY_HTTP_PROXY_SETTING_MODE = 40,
    WS_CHANNEL_PROPERTY_CUSTOM_HTTP_PROXY = 41,
    WS_CHANNEL_PROPERTY_HTTP_MESSAGE_MAPPING = 42,
    WS_CHANNEL_PROPERTY_ENABLE_HTTP_REDIRECT = 43,
    WS_CHANNEL_PROPERTY_HTTP_REDIRECT_CALLBACK_CONTEXT = 44,
    WS_CHANNEL_PROPERTY_FAULTS_AS_ERRORS = 45,
    WS_CHANNEL_PROPERTY_ALLOW_UNSECURED_FAULTS = 46,
    WS_CHANNEL_PROPERTY_HTTP_SERVER_SPN = 47,
    WS_CHANNEL_PROPERTY_HTTP_PROXY_SPN = 48,
    WS_CHANNEL_PROPERTY_MAX_HTTP_REQUEST_HEADERS_BUFFER_SIZE = 49,
} WS_CHANNEL_PROPERTY_ID;

enum {
    WS_HTTP_HEADER_MAPPING_COMMA_SEPARATOR = 0x1,
    WS_HTTP_HEADER_MAPPING_SEMICOLON_SEPARATOR = 0x2,
    WS_HTTP_HEADER_MAPPING_QUOTED_VALUE = 0x4,
};

enum {
    WS_HTTP_RESPONSE_MAPPING_STATUS_CODE = 0x1,
    WS_HTTP_RESPONSE_MAPPING_STATUS_TEXT = 0x2,
};

enum {
    WS_HTTP_REQUEST_MAPPING_VERB = 0x2,
};

typedef enum {
    WS_MANUAL_COOKIE_MODE = 1,
    WS_AUTO_COOKIE_MODE = 2,
} WS_COOKIE_MODE;

typedef enum {
    WS_OPERATION_CONTEXT_PROPERTY_CHANNEL = 0,
    WS_OPERATION_CONTEXT_PROPERTY_CONTRACT_DESCRIPTION = 1,
    WS_OPERATION_CONTEXT_PROPERTY_HOST_USER_STATE = 2,
    WS_OPERATION_CONTEXT_PROPERTY_CHANNEL_USER_STATE = 3,
    WS_OPERATION_CONTEXT_PROPERTY_INPUT_MESSAGE = 4,
    WS_OPERATION_CONTEXT_PROPERTY_OUTPUT_MESSAGE = 5,
    WS_OPERATION_CONTEXT_PROPERTY_HEAP = 6,
    WS_OPERATION_CONTEXT_PROPERTY_LISTENER = 7,
    WS_OPERATION_CONTEXT_PROPERTY_ENDPOINT_ADDRESS = 8,
} WS_OPERATION_CONTEXT_PROPERTY_ID;

typedef enum {
    WS_DNS_ENDPOINT_IDENTITY_TYPE = 1,
    WS_UPN_ENDPOINT_IDENTITY_TYPE = 2,
    WS_SPN_ENDPOINT_IDENTITY_TYPE = 3,
    WS_RSA_ENDPOINT_IDENTITY_TYPE = 4,
    WS_CERT_ENDPOINT_IDENTITY_TYPE = 5,
    WS_UNKNOWN_ENDPOINT_IDENTITY_TYPE = 6,
} WS_ENDPOINT_IDENTITY_TYPE;

typedef enum {
    WS_ENDPOINT_ADDRESS_EXTENSION_METADATA_ADDRESS = 1,
} WS_ENDPOINT_ADDRESS_EXTENSION_TYPE;

typedef enum {
    WS_ERROR_PROPERTY_STRING_COUNT = 0,
    WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE = 1,
    WS_ERROR_PROPERTY_LANGID = 2,
} WS_ERROR_PROPERTY_ID;

typedef enum {
    WS_EXCEPTION_CODE_USAGE_FAILURE = 0xC03D0000,
    WS_EXCEPTION_CODE_INTERNAL_FAILURE = 0xc03d0001,
} WS_EXCEPTION_CODE;

typedef enum {
    WS_FAULT_ERROR_PROPERTY_FAULT = 0,
    WS_FAULT_ERROR_PROPERTY_ACTION = 1,
    WS_FAULT_ERROR_PROPERTY_HEADER = 2,
} WS_FAULT_ERROR_PROPERTY_ID;

typedef enum {
    WS_MINIMAL_FAULT_DISCLOSURE = 0,
    WS_FULL_FAULT_DISCLOSURE = 1,
} WS_FAULT_DISCLOSURE;

typedef enum {
    WS_HEAP_PROPERTY_MAX_SIZE = 0,
    WS_HEAP_PROPERTY_TRIM_SIZE = 1,
    WS_HEAP_PROPERTY_REQUESTED_SIZE = 2,
    WS_HEAP_PROPERTY_ACTUAL_SIZE = 3,
} WS_HEAP_PROPERTY_ID;

typedef enum {
    WS_LISTENER_STATE_CREATED = 0,
    WS_LISTENER_STATE_OPENING = 1,
    WS_LISTENER_STATE_OPEN = 2,
    WS_LISTENER_STATE_FAULTED = 3,
    WS_LISTENER_STATE_CLOSING = 4,
    WS_LISTENER_STATE_CLOSED = 5,
} WS_LISTENER_STATE;

typedef enum {
    WS_LISTENER_PROPERTY_LISTEN_BACKLOG = 0,
    WS_LISTENER_PROPERTY_IP_VERSION = 1,
    WS_LISTENER_PROPERTY_STATE = 2,
    WS_LISTENER_PROPERTY_ASYNC_CALLBACK_MODEL = 3,
    WS_LISTENER_PROPERTY_CHANNEL_TYPE = 4,
    WS_LISTENER_PROPERTY_CHANNEL_BINDING = 5,
    WS_LISTENER_PROPERTY_CONNECT_TIMEOUT = 6,
    WS_LISTENER_PROPERTY_IS_MULTICAST = 7,
    WS_LISTENER_PROPERTY_MULTICAST_INTERFACES = 8,
    WS_LISTENER_PROPERTY_MULTICAST_LOOPBACK = 9,
    WS_LISTENER_PROPERTY_CLOSE_TIMEOUT = 10,
    WS_LISTENER_PROPERTY_TO_HEADER_MATCHING_OPTIONS = 11,
    WS_LISTENER_PROPERTY_TRANSPORT_URL_MATCHING_OPTIONS = 12,
    WS_LISTENER_PROPERTY_CUSTOM_LISTENER_CALLBACKS = 13,
    WS_LISTENER_PROPERTY_CUSTOM_LISTENER_PARAMETERS = 14,
    WS_LISTENER_PROPERTY_CUSTOM_LISTENER_INSTANCE = 15,
    WS_LISTENER_PROPERTY_DISALLOWED_USER_AGENT = 16,
} WS_LISTENER_PROPERTY_ID;

typedef enum {
    WS_IP_VERSION_4 = 1,
    WS_IP_VERSION_6 = 2,
    WS_IP_VERSION_AUTO = 3,
} WS_IP_VERSION;

enum {
    WS_MATCH_URL_DNS_HOST = 0x1,
    WS_MATCH_URL_DNS_FULLY_QUALIFIED_HOST = 0x2,
    WS_MATCH_URL_NETBIOS_HOST = 0x4,
    WS_MATCH_URL_LOCAL_HOST = 0x8,
    WS_MATCH_URL_HOST_ADDRESSES = 0x10,
    WS_MATCH_URL_THIS_HOST = (WS_MATCH_URL_DNS_HOST | WS_MATCH_URL_DNS_FULLY_QUALIFIED_HOST | WS_MATCH_URL_NETBIOS_HOST | WS_MATCH_URL_LOCAL_HOST | WS_MATCH_URL_HOST_ADDRESSES),
    WS_MATCH_URL_PORT = 0x20,
    WS_MATCH_URL_EXACT_PATH = 0x40,
    WS_MATCH_URL_PREFIX_PATH = 0x80,
    WS_MATCH_URL_NO_QUERY = 0x100,
};

typedef enum {
    WS_MESSAGE_STATE_EMPTY = 1,
    WS_MESSAGE_STATE_INITIALIZED = 2,
    WS_MESSAGE_STATE_READING = 3,
    WS_MESSAGE_STATE_WRITING = 4,
    WS_MESSAGE_STATE_DONE = 5,
} WS_MESSAGE_STATE;

typedef enum {
    WS_BLANK_MESSAGE = 0,
    WS_DUPLICATE_MESSAGE = 1,
    WS_REQUEST_MESSAGE = 2,
    WS_REPLY_MESSAGE = 3,
    WS_FAULT_MESSAGE = 4,
} WS_MESSAGE_INITIALIZATION;

typedef enum {
    WS_REPEATING_HEADER = 1,
    WS_SINGLETON_HEADER = 2,
} WS_REPEATING_HEADER_OPTION;

typedef enum {
    WS_ACTION_HEADER = 1,
    WS_TO_HEADER = 2,
    WS_MESSAGE_ID_HEADER = 3,
    WS_RELATES_TO_HEADER = 4,
    WS_FROM_HEADER = 5,
    WS_REPLY_TO_HEADER = 6,
    WS_FAULT_TO_HEADER = 7,
} WS_HEADER_TYPE;

enum {
    WS_MUST_UNDERSTAND_HEADER_ATTRIBUTE = 0x1,
    WS_RELAY_HEADER_ATTRIBUTE = 0x2,
};

typedef enum {
    WS_ADDRESSING_VERSION_0_9 = 1,
    WS_ADDRESSING_VERSION_1_0 = 2,
    WS_ADDRESSING_VERSION_TRANSPORT = 3,
} WS_ADDRESSING_VERSION;

typedef enum {
    WS_ENVELOPE_VERSION_SOAP_1_1 = 1,
    WS_ENVELOPE_VERSION_SOAP_1_2 = 2,
    WS_ENVELOPE_VERSION_NONE = 3,
} WS_ENVELOPE_VERSION;

typedef enum {
    WS_MESSAGE_PROPERTY_STATE = 0,
    WS_MESSAGE_PROPERTY_HEAP = 1,
    WS_MESSAGE_PROPERTY_ENVELOPE_VERSION = 2,
    WS_MESSAGE_PROPERTY_ADDRESSING_VERSION = 3,
    WS_MESSAGE_PROPERTY_HEADER_BUFFER = 4,
    WS_MESSAGE_PROPERTY_HEADER_POSITION = 5,
    WS_MESSAGE_PROPERTY_BODY_READER = 6,
    WS_MESSAGE_PROPERTY_BODY_WRITER = 7,
    WS_MESSAGE_PROPERTY_IS_ADDRESSED = 8,
    WS_MESSAGE_PROPERTY_HEAP_PROPERTIES = 9,
    WS_MESSAGE_PROPERTY_XML_READER_PROPERTIES = 10,
    WS_MESSAGE_PROPERTY_XML_WRITER_PROPERTIES = 11,
    WS_MESSAGE_PROPERTY_IS_FAULT = 12,
    WS_MESSAGE_PROPERTY_MAX_PROCESSED_HEADERS = 13,
    WS_MESSAGE_PROPERTY_USERNAME = 14,
    WS_MESSAGE_PROPERTY_ENCODED_CERT = 15,
    WS_MESSAGE_PROPERTY_TRANSPORT_SECURITY_WINDOWS_TOKEN = 16,
    WS_MESSAGE_PROPERTY_HTTP_HEADER_AUTH_WINDOWS_TOKEN = 17,
    WS_MESSAGE_PROPERTY_MESSAGE_SECURITY_WINDOWS_TOKEN = 18,
    WS_MESSAGE_PROPERTY_SAML_ASSERTION = 19,
    WS_MESSAGE_PROPERTY_SECURITY_CONTEXT = 20,
    WS_MESSAGE_PROPERTY_PROTECTION_LEVEL = 21,
} WS_MESSAGE_PROPERTY_ID;

typedef enum {
    WS_SSL_TRANSPORT_SECURITY_BINDING_TYPE = 1,
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TYPE = 2,
    WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TYPE = 3,
    WS_USERNAME_MESSAGE_SECURITY_BINDING_TYPE = 4,
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TYPE = 5,
    WS_XML_TOKEN_MESSAGE_SECURITY_BINDING_TYPE = 6,
    WS_SAML_MESSAGE_SECURITY_BINDING_TYPE = 7,
    WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_TYPE = 8,
} WS_SECURITY_BINDING_TYPE;

enum {
    WS_HTTP_HEADER_AUTH_SCHEME_NONE = 0x1,
    WS_HTTP_HEADER_AUTH_SCHEME_BASIC = 0x2,
    WS_HTTP_HEADER_AUTH_SCHEME_DIGEST = 0x4,
    WS_HTTP_HEADER_AUTH_SCHEME_NTLM = 0x8,
    WS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE = 0x10,
    WS_HTTP_HEADER_AUTH_SCHEME_PASSPORT = 0x20,
};

typedef enum {
    WS_HTTP_HEADER_AUTH_TARGET_SERVICE = 1,
    WS_HTTP_HEADER_AUTH_TARGET_PROXY = 2,
} WS_HTTP_HEADER_AUTH_TARGET;

typedef enum {
    WS_WINDOWS_INTEGRATED_AUTH_PACKAGE_KERBEROS = 1,
    WS_WINDOWS_INTEGRATED_AUTH_PACKAGE_NTLM = 2,
    WS_WINDOWS_INTEGRATED_AUTH_PACKAGE_SPNEGO = 3,
} WS_WINDOWS_INTEGRATED_AUTH_PACKAGE;

typedef enum {
    WS_SECURITY_HEADER_VERSION_1_0 = 0x1,
    WS_SECURITY_HEADER_VERSION_1_1 = 0x2,
} WS_SECURITY_HEADER_VERSION;

typedef enum {
    WS_TRUST_VERSION_FEBRUARY_2005 = 0x1,
    WS_TRUST_VERSION_1_3 = 0x2,
} WS_TRUST_VERSION;

typedef enum {
    WS_REQUEST_SECURITY_TOKEN_ACTION_ISSUE = 1,
    WS_REQUEST_SECURITY_TOKEN_ACTION_NEW_CONTEXT = 2,
    WS_REQUEST_SECURITY_TOKEN_ACTION_RENEW_CONTEXT = 3,
} WS_REQUEST_SECURITY_TOKEN_ACTION;

typedef enum {
    WS_SECURE_CONVERSATION_VERSION_FEBRUARY_2005 = 0x1,
    WS_SECURE_CONVERSATION_VERSION_1_3 = 0x2,
} WS_SECURE_CONVERSATION_VERSION;

typedef enum {
    WS_SECURITY_TIMESTAMP_USAGE_ALWAYS = 1,
    WS_SECURITY_TIMESTAMP_USAGE_NEVER = 2,
    WS_SECURITY_TIMESTAMP_USAGE_REQUESTS_ONLY = 3,
} WS_SECURITY_TIMESTAMP_USAGE;

typedef enum {
    WS_SECURITY_HEADER_LAYOUT_STRICT = 1,
    WS_SECURITY_HEADER_LAYOUT_LAX = 2,
    WS_SECURITY_HEADER_LAYOUT_LAX_WITH_TIMESTAMP_FIRST = 3,
    WS_SECURITY_HEADER_LAYOUT_LAX_WITH_TIMESTAMP_LAST = 4,
} WS_SECURITY_HEADER_LAYOUT;

typedef enum {
    LESS_BILL_GATES = -1
} WS_SECURITY_ALGORITHM_PROPERTY_ID;

typedef enum {
    WS_SECURITY_ALGORITHM_DEFAULT = 0,
    WS_SECURITY_ALGORITHM_CANONICALIZATION_EXCLUSIVE = 1,
    WS_SECURITY_ALGORITHM_CANONICALIZATION_EXCLUSIVE_WITH_COMMENTS = 2,
    WS_SECURITY_ALGORITHM_DIGEST_SHA1 = 3,
    WS_SECURITY_ALGORITHM_DIGEST_SHA_256 = 4,
    WS_SECURITY_ALGORITHM_DIGEST_SHA_384 = 5,
    WS_SECURITY_ALGORITHM_DIGEST_SHA_512 = 6,
    WS_SECURITY_ALGORITHM_SYMMETRIC_SIGNATURE_HMAC_SHA1 = 7,
    WS_SECURITY_ALGORITHM_SYMMETRIC_SIGNATURE_HMAC_SHA_256 = 8,
    WS_SECURITY_ALGORITHM_SYMMETRIC_SIGNATURE_HMAC_SHA_384 = 9,
    WS_SECURITY_ALGORITHM_SYMMETRIC_SIGNATURE_HMAC_SHA_512 = 10,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_SIGNATURE_RSA_SHA1 = 11,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_SIGNATURE_DSA_SHA1 = 12,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_SIGNATURE_RSA_SHA_256 = 13,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_SIGNATURE_RSA_SHA_384 = 14,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_SIGNATURE_RSA_SHA_512 = 15,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_KEYWRAP_RSA_1_5 = 16,
    WS_SECURITY_ALGORITHM_ASYMMETRIC_KEYWRAP_RSA_OAEP = 17,
    WS_SECURITY_ALGORITHM_KEY_DERIVATION_P_SHA1 = 18,
} WS_SECURITY_ALGORITHM_ID;

typedef enum {
    WS_PROTECTION_LEVEL_NONE = 1,
    WS_PROTECTION_LEVEL_SIGN = 2,
    WS_PROTECTION_LEVEL_SIGN_AND_ENCRYPT = 3,
} WS_PROTECTION_LEVEL;

typedef enum {
    WS_SECURITY_PROPERTY_TRANSPORT_PROTECTION_LEVEL = 1,
    WS_SECURITY_PROPERTY_ALGORITHM_SUITE = 2,
    WS_SECURITY_PROPERTY_ALGORITHM_SUITE_NAME = 3,
    WS_SECURITY_PROPERTY_MAX_ALLOWED_LATENCY = 4,
    WS_SECURITY_PROPERTY_TIMESTAMP_VALIDITY_DURATION = 5,
    WS_SECURITY_PROPERTY_MAX_ALLOWED_CLOCK_SKEW = 6,
    WS_SECURITY_PROPERTY_TIMESTAMP_USAGE = 7,
    WS_SECURITY_PROPERTY_SECURITY_HEADER_LAYOUT = 8,
    WS_SECURITY_PROPERTY_SECURITY_HEADER_VERSION = 9,
    WS_SECURITY_PROPERTY_EXTENDED_PROTECTION_POLICY = 10,
    WS_SECURITY_PROPERTY_EXTENDED_PROTECTION_SCENARIO = 11,
    WS_SECURITY_PROPERTY_SERVICE_IDENTITIES = 12,
} WS_SECURITY_PROPERTY_ID;

typedef enum {
    WS_SECURITY_KEY_TYPE_NONE = 1,
    WS_SECURITY_KEY_TYPE_SYMMETRIC = 2,
    WS_SECURITY_KEY_TYPE_ASYMMETRIC = 3,
} WS_SECURITY_KEY_TYPE;

typedef enum {
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC256 = 1,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC192 = 2,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC128 = 3,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC256_RSA15 = 4,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC192_RSA15 = 5,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC128_RSA15 = 6,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC256_SHA256 = 7,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC192_SHA256 = 8,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC128_SHA256 = 9,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC256_SHA256_RSA15 = 10,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC192_SHA256_RSA15 = 11,
    WS_SECURITY_ALGORITHM_SUITE_NAME_BASIC128_SHA256_RSA15 = 12,
} WS_SECURITY_ALGORITHM_SUITE_NAME;

typedef enum {
    WS_SECURITY_TOKEN_REFERENCE_MODE_LOCAL_ID = 1,
    WS_SECURITY_TOKEN_REFERENCE_MODE_XML_BUFFER = 2,
    WS_SECURITY_TOKEN_REFERENCE_MODE_CERT_THUMBPRINT = 3,
    WS_SECURITY_TOKEN_REFERENCE_MODE_SECURITY_CONTEXT_ID = 4,
    WS_SECURITY_TOKEN_REFERENCE_MODE_SAML_ASSERTION_ID = 5,
} WS_SECURITY_TOKEN_REFERENCE_MODE;

enum {
    WS_CERT_FAILURE_CN_MISMATCH = 0x1,
    WS_CERT_FAILURE_INVALID_DATE = 0x2,
    WS_CERT_FAILURE_UNTRUSTED_ROOT = 0x4,
    WS_CERT_FAILURE_WRONG_USAGE = 0x8,
    WS_CERT_FAILURE_REVOCATION_OFFLINE = 0x10,
};

typedef enum {
    WS_SECURITY_KEY_ENTROPY_MODE_CLIENT_ONLY = 1,
    WS_SECURITY_KEY_ENTROPY_MODE_SERVER_ONLY = 2,
    WS_SECURITY_KEY_ENTROPY_MODE_COMBINED = 3,
} WS_SECURITY_KEY_ENTROPY_MODE;

typedef enum {
    WS_EXTENDED_PROTECTION_POLICY_NEVER = 1,
    WS_EXTENDED_PROTECTION_POLICY_WHEN_SUPPORTED = 2,
    WS_EXTENDED_PROTECTION_POLICY_ALWAYS = 3,
} WS_EXTENDED_PROTECTION_POLICY;

typedef enum {
    WS_EXTENDED_PROTECTION_SCENARIO_BOUND_SERVER = 1,
    WS_EXTENDED_PROTECTION_SCENARIO_TERMINATED_SSL = 2,
} WS_EXTENDED_PROTECTION_SCENARIO;

typedef enum {
    WS_SECURITY_BINDING_PROPERTY_REQUIRE_SSL_CLIENT_CERT = 1,
    WS_SECURITY_BINDING_PROPERTY_WINDOWS_INTEGRATED_AUTH_PACKAGE = 2,
    WS_SECURITY_BINDING_PROPERTY_REQUIRE_SERVER_AUTH = 3,
    WS_SECURITY_BINDING_PROPERTY_ALLOW_ANONYMOUS_CLIENTS = 4,
    WS_SECURITY_BINDING_PROPERTY_ALLOWED_IMPERSONATION_LEVEL = 5,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME = 6,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_TARGET = 7,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_BASIC_REALM = 8,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_DIGEST_REALM = 9,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_DIGEST_DOMAIN = 10,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_KEY_SIZE = 11,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_KEY_ENTROPY_MODE = 12,
    WS_SECURITY_BINDING_PROPERTY_MESSAGE_PROPERTIES = 13,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_MAX_PENDING_CONTEXTS = 14,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_MAX_ACTIVE_CONTEXTS = 15,
    WS_SECURITY_BINDING_PROPERTY_SECURE_CONVERSATION_VERSION = 16,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_SUPPORT_RENEW = 17,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_RENEWAL_INTERVAL = 18,
    WS_SECURITY_BINDING_PROPERTY_SECURITY_CONTEXT_ROLLOVER_INTERVAL = 19,
    WS_SECURITY_BINDING_PROPERTY_CERT_FAILURES_TO_IGNORE = 20,
    WS_SECURITY_BINDING_PROPERTY_DISABLE_CERT_REVOCATION_CHECK = 21,
} WS_SECURITY_BINDING_PROPERTY_ID;

typedef enum {
    WS_SUBJECT_NAME_CERT_CREDENTIAL_TYPE = 1,
    WS_THUMBPRINT_CERT_CREDENTIAL_TYPE = 2,
    WS_CUSTOM_CERT_CREDENTIAL_TYPE = 3,
} WS_CERT_CREDENTIAL_TYPE;

typedef enum {
    WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE = 1,
    WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE = 2,
    WS_OPAQUE_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE = 3,
} WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE;

typedef enum {
    WS_STRING_USERNAME_CREDENTIAL_TYPE = 1,
} WS_USERNAME_CREDENTIAL_TYPE;

typedef enum {
    WS_SECURITY_TOKEN_PROPERTY_KEY_TYPE = 1,
    WS_SECURITY_TOKEN_PROPERTY_VALID_FROM_TIME = 2,
    WS_SECURITY_TOKEN_PROPERTY_VALID_TILL_TIME = 3,
    WS_SECURITY_TOKEN_PROPERTY_SERIALIZED_XML = 4,
    WS_SECURITY_TOKEN_PROPERTY_ATTACHED_REFERENCE_XML = 5,
    WS_SECURITY_TOKEN_PROPERTY_UNATTACHED_REFERENCE_XML = 6,
    WS_SECURITY_TOKEN_PROPERTY_SYMMETRIC_KEY = 7,
} WS_SECURITY_TOKEN_PROPERTY_ID;

typedef enum {
    WS_RAW_SYMMETRIC_SECURITY_KEY_HANDLE_TYPE = 1,
    WS_NCRYPT_ASYMMETRIC_SECURITY_KEY_HANDLE_TYPE = 2,
    WS_CAPI_ASYMMETRIC_SECURITY_KEY_HANDLE_TYPE = 3,
} WS_SECURITY_KEY_HANDLE_TYPE;

typedef enum {
    WS_SUPPORTING_MESSAGE_SECURITY_USAGE = 1,
} WS_MESSAGE_SECURITY_USAGE;

typedef enum {
    WS_SECURITY_CONTEXT_PROPERTY_IDENTIFIER = 1,
    WS_SECURITY_CONTEXT_PROPERTY_USERNAME = 2,
    WS_SECURITY_CONTEXT_PROPERTY_MESSAGE_SECURITY_WINDOWS_TOKEN = 3,
    WS_SECURITY_CONTEXT_PROPERTY_SAML_ASSERTION = 4,
} WS_SECURITY_CONTEXT_PROPERTY_ID;

typedef enum {
    WS_XML_SECURITY_TOKEN_PROPERTY_ATTACHED_REFERENCE = 1,
    WS_XML_SECURITY_TOKEN_PROPERTY_UNATTACHED_REFERENCE = 2,
    WS_XML_SECURITY_TOKEN_PROPERTY_VALID_FROM_TIME = 3,
    WS_XML_SECURITY_TOKEN_PROPERTY_VALID_TILL_TIME = 4,
} WS_XML_SECURITY_TOKEN_PROPERTY_ID;

typedef enum {
    WS_CERT_SIGNED_SAML_AUTHENTICATOR_TYPE = 1,
} WS_SAML_AUTHENTICATOR_TYPE;

typedef enum {
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_APPLIES_TO = 1,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_TRUST_VERSION = 2,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_SECURE_CONVERSATION_VERSION = 3,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_ISSUED_TOKEN_TYPE = 4,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_REQUEST_ACTION = 5,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_EXISTING_TOKEN = 6,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_ISSUED_TOKEN_KEY_TYPE = 7,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_ISSUED_TOKEN_KEY_SIZE = 8,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_ISSUED_TOKEN_KEY_ENTROPY = 9,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_LOCAL_REQUEST_PARAMETERS = 10,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_SERVICE_REQUEST_PARAMETERS = 11,
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_MESSAGE_PROPERTIES = 12,
} WS_REQUEST_SECURITY_TOKEN_PROPERTY_ID;

typedef enum {
    WS_BOOL_TYPE = 0,
    WS_INT8_TYPE = 1,
    WS_INT16_TYPE = 2,
    WS_INT32_TYPE = 3,
    WS_INT64_TYPE = 4,
    WS_UINT8_TYPE = 5,
    WS_UINT16_TYPE = 6,
    WS_UINT32_TYPE = 7,
    WS_UINT64_TYPE = 8,
    WS_FLOAT_TYPE = 9,
    WS_DOUBLE_TYPE = 10,
    WS_DECIMAL_TYPE = 11,
    WS_DATETIME_TYPE = 12,
    WS_TIMESPAN_TYPE = 13,
    WS_GUID_TYPE = 14,
    WS_UNIQUE_ID_TYPE = 15,
    WS_STRING_TYPE = 16,
    WS_WSZ_TYPE = 17,
    WS_BYTES_TYPE = 18,
    WS_XML_STRING_TYPE = 19,
    WS_XML_QNAME_TYPE = 20,
    WS_XML_BUFFER_TYPE = 21,
    WS_CHAR_ARRAY_TYPE = 22,
    WS_UTF8_ARRAY_TYPE = 23,
    WS_BYTE_ARRAY_TYPE = 24,
    WS_DESCRIPTION_TYPE = 25,
    WS_STRUCT_TYPE = 26,
    WS_CUSTOM_TYPE = 27,
    WS_ENDPOINT_ADDRESS_TYPE = 28,
    WS_FAULT_TYPE = 29,
    WS_VOID_TYPE = 30,
    WS_ENUM_TYPE = 31,
    WS_DURATION_TYPE = 32,
    WS_UNION_TYPE = 33,
    WS_ANY_ATTRIBUTES_TYPE = 34,
} WS_TYPE;

typedef enum {
    WS_TYPE_ATTRIBUTE_FIELD_MAPPING = 0,
    WS_ATTRIBUTE_FIELD_MAPPING = 1,
    WS_ELEMENT_FIELD_MAPPING = 2,
    WS_REPEATING_ELEMENT_FIELD_MAPPING = 3,
    WS_TEXT_FIELD_MAPPING = 4,
    WS_NO_FIELD_MAPPING = 5,
    WS_XML_ATTRIBUTE_FIELD_MAPPING = 6,
    WS_ELEMENT_CHOICE_FIELD_MAPPING = 7,
    WS_REPEATING_ELEMENT_CHOICE_FIELD_MAPPING = 8,
    WS_ANY_ELEMENT_FIELD_MAPPING = 9,
    WS_REPEATING_ANY_ELEMENT_FIELD_MAPPING = 10,
    WS_ANY_CONTENT_FIELD_MAPPING = 11,
    WS_ANY_ATTRIBUTES_FIELD_MAPPING = 12,
} WS_FIELD_MAPPING;

enum {
    WS_STRUCT_ABSTRACT = 0x1,
    WS_STRUCT_IGNORE_TRAILING_ELEMENT_CONTENT = 0x2,
    WS_STRUCT_IGNORE_UNHANDLED_ATTRIBUTES = 0x4,
};

enum {
    WS_FIELD_POINTER = 0x1,
    WS_FIELD_OPTIONAL = 0x2,
    WS_FIELD_NILLABLE = 0x4,
    WS_FIELD_NILLABLE_ITEM = 0x8,
    WS_FIELD_OTHER_NAMESPACE = 0x10,
};

typedef enum {
    WS_ELEMENT_TYPE_MAPPING = 1,
    WS_ATTRIBUTE_TYPE_MAPPING = 2,
    WS_ELEMENT_CONTENT_TYPE_MAPPING = 3,
    WS_ANY_ELEMENT_TYPE_MAPPING = 4,
} WS_TYPE_MAPPING;

typedef enum {
    WS_READ_REQUIRED_VALUE = 1,
    WS_READ_REQUIRED_POINTER = 2,
    WS_READ_OPTIONAL_POINTER = 3,
    WS_READ_NILLABLE_POINTER = 4,
    WS_READ_NILLABLE_VALUE = 5,
} WS_READ_OPTION;

typedef enum {
    WS_WRITE_REQUIRED_VALUE = 1,
    WS_WRITE_REQUIRED_POINTER = 2,
    WS_WRITE_NILLABLE_VALUE = 3,
    WS_WRITE_NILLABLE_POINTER = 4,
} WS_WRITE_OPTION;

typedef enum {
    WS_SERVICE_HOST_ABORT = 0,
    WS_SERVICE_CHANNEL_FAULTED = 1,
} WS_SERVICE_CANCEL_REASON;

typedef enum {
    WS_NON_RPC_LITERAL_OPERATION = 0,
    WS_RPC_LITERAL_OPERATION = 1,
} WS_OPERATION_STYLE;

typedef enum {
    WS_PARAMETER_TYPE_NORMAL = 0,
    WS_PARAMETER_TYPE_ARRAY = 1,
    WS_PARAMETER_TYPE_ARRAY_COUNT = 2,
    WS_PARAMETER_TYPE_MESSAGES = 3,
} WS_PARAMETER_TYPE;

enum {
    WS_SERVICE_OPERATION_MESSAGE_NILLABLE_ELEMENT = 0x1,
};

typedef enum {
    WS_SERVICE_ENDPOINT_PROPERTY_ACCEPT_CHANNEL_CALLBACK = 0,
    WS_SERVICE_ENDPOINT_PROPERTY_CLOSE_CHANNEL_CALLBACK = 1,
    WS_SERVICE_ENDPOINT_PROPERTY_MAX_ACCEPTING_CHANNELS = 2,
    WS_SERVICE_ENDPOINT_PROPERTY_MAX_CONCURRENCY = 3,
    WS_SERVICE_ENDPOINT_PROPERTY_BODY_HEAP_MAX_SIZE = 4,
    WS_SERVICE_ENDPOINT_PROPERTY_BODY_HEAP_TRIM_SIZE = 5,
    WS_SERVICE_ENDPOINT_PROPERTY_MESSAGE_PROPERTIES = 6,
    WS_SERVICE_ENDPOINT_PROPERTY_MAX_CALL_POOL_SIZE = 7,
    WS_SERVICE_ENDPOINT_PROPERTY_MAX_CHANNEL_POOL_SIZE = 8,
    WS_SERVICE_ENDPOINT_PROPERTY_LISTENER_PROPERTIES = 9,
    WS_SERVICE_ENDPOINT_PROPERTY_CHECK_MUST_UNDERSTAND = 10,
    WS_SERVICE_ENDPOINT_PROPERTY_METADATA_EXCHANGE_TYPE = 11,
    WS_SERVICE_ENDPOINT_PROPERTY_METADATA = 12,
    WS_SERVICE_ENDPOINT_PROPERTY_METADATA_EXCHANGE_URL_SUFFIX = 13,
    WS_SERVICE_ENDPOINT_PROPERTY_MAX_CHANNELS = 14,
} WS_SERVICE_ENDPOINT_PROPERTY_ID;

typedef enum {
    WS_METADATA_EXCHANGE_TYPE_NONE = 0,
    WS_METADATA_EXCHANGE_TYPE_MEX = 1,
    WS_METADATA_EXCHANGE_TYPE_HTTP_GET = 2,
} WS_METADATA_EXCHANGE_TYPE;

typedef enum {
    WS_SERVICE_PROPERTY_HOST_USER_STATE = 0,
    WS_SERVICE_PROPERTY_FAULT_DISCLOSURE = 1,
    WS_SERVICE_PROPERTY_FAULT_LANGID = 2,
    WS_SERVICE_PROPERTY_HOST_STATE = 3,
    WS_SERVICE_PROPERTY_METADATA = 4,
    WS_SERVICE_PROPERTY_CLOSE_TIMEOUT = 5,
} WS_SERVICE_PROPERTY_ID;

typedef enum {
    WS_SERVICE_HOST_STATE_CREATED = 0,
    WS_SERVICE_HOST_STATE_OPENING = 1,
    WS_SERVICE_HOST_STATE_OPEN = 2,
    WS_SERVICE_HOST_STATE_CLOSING = 3,
    WS_SERVICE_HOST_STATE_CLOSED = 4,
    WS_SERVICE_HOST_STATE_FAULTED = 5,
} WS_SERVICE_HOST_STATE;

typedef enum {
    WS_SERVICE_PROXY_STATE_CREATED = 0,
    WS_SERVICE_PROXY_STATE_OPENING = 1,
    WS_SERVICE_PROXY_STATE_OPEN = 2,
    WS_SERVICE_PROXY_STATE_CLOSING = 3,
    WS_SERVICE_PROXY_STATE_CLOSED = 4,
    WS_SERVICE_PROXY_STATE_FAULTED = 5,
} WS_SERVICE_PROXY_STATE;

typedef enum {
    WS_PROXY_PROPERTY_CALL_TIMEOUT = 0,
    WS_PROXY_PROPERTY_MESSAGE_PROPERTIES = 1,
    WS_PROXY_PROPERTY_MAX_CALL_POOL_SIZE = 2,
    WS_PROXY_PROPERTY_STATE = 3,
    WS_PROXY_PROPERTY_MAX_PENDING_CALLS = 4,
    WS_PROXY_PROPERTY_MAX_CLOSE_TIMEOUT = 5,
    WS_PROXY_FAULT_LANG_ID = 6,
} WS_PROXY_PROPERTY_ID;

typedef enum {
    WS_CALL_PROPERTY_CALL_ID = 0,
    WS_CALL_PROPERTY_SEND_MESSAGE_CONTEXT = 1,
    WS_CALL_PROPERTY_RECEIVE_MESSAGE_CONTEXT = 2,
    WS_CALL_PROPERTY_CHECK_MUST_UNDERSTAND = 3,
} WS_CALL_PROPERTY_ID;

typedef enum {
    WS_TRACE_API_NONE = -1,
    WS_TRACE_API_START_READER_CANONICALIZATION = 0,
    WS_TRACE_API_END_READER_CANONICALIZATION = 1,
    WS_TRACE_API_START_WRITER_CANONICALIZATION = 2,
    WS_TRACE_API_END_WRITER_CANONICALIZATION = 3,
    WS_TRACE_API_CREATE_XML_BUFFER = 4,
    WS_TRACE_API_REMOVE_NODE = 5,
    WS_TRACE_API_CREATE_READER = 6,
    WS_TRACE_API_SET_INPUT = 7,
    WS_TRACE_API_SET_INPUT_TO_BUFFER = 8,
    WS_TRACE_API_FREE_XML_READER = 9,
    WS_TRACE_API_GET_READER_PROPERTY = 10,
    WS_TRACE_API_GET_READER_NODE = 11,
    WS_TRACE_API_FILL_READER = 12,
    WS_TRACE_API_READ_START_ELEMENT = 13,
    WS_TRACE_API_READ_TO_START_ELEMENT = 14,
    WS_TRACE_API_READ_START_ATTRIBUTE = 15,
    WS_TRACE_API_READ_END_ATTRIBUTE = 16,
    WS_TRACE_API_READ_NODE = 17,
    WS_TRACE_API_SKIP_NODE = 18,
    WS_TRACE_API_READ_END_ELEMENT = 19,
    WS_TRACE_API_FIND_ATTRIBUTE = 20,
    WS_TRACE_API_READ_ELEMENT_VALUE = 21,
    WS_TRACE_API_READ_CHARS = 22,
    WS_TRACE_API_READ_CHARS_UTF8 = 23,
    WS_TRACE_API_READ_BYTES = 24,
    WS_TRACE_API_READ_ARRAY = 25,
    WS_TRACE_API_GET_READER_POSITION = 26,
    WS_TRACE_API_SET_READER_POSITION = 27,
    WS_TRACE_API_MOVE_READER = 28,
    WS_TRACE_API_CREATE_WRITER = 29,
    WS_TRACE_API_FREE_XML_WRITER = 30,
    WS_TRACE_API_SET_OUTPUT = 31,
    WS_TRACE_API_SET_OUTPUT_TO_BUFFER = 32,
    WS_TRACE_API_GET_WRITER_PROPERTY = 33,
    WS_TRACE_API_FLUSH_WRITER = 34,
    WS_TRACE_API_WRITE_START_ELEMENT = 35,
    WS_TRACE_API_WRITE_END_START_ELEMENT = 36,
    WS_TRACE_API_WRITE_XMLNS_ATTRIBUTE = 37,
    WS_TRACE_API_WRITE_START_ATTRIBUTE = 38,
    WS_TRACE_API_WRITE_END_ATTRIBUTE = 39,
    WS_TRACE_API_WRITE_VALUE = 40,
    WS_TRACE_API_WRITE_XML_BUFFER = 41,
    WS_TRACE_API_READ_XML_BUFFER = 42,
    WS_TRACE_API_WRITE_XML_BUFFER_TO_BYTES = 43,
    WS_TRACE_API_READ_XML_BUFFER_FROM_BYTES = 44,
    WS_TRACE_API_WRITE_ARRAY = 45,
    WS_TRACE_API_WRITE_QUALIFIED_NAME = 46,
    WS_TRACE_API_WRITE_CHARS = 47,
    WS_TRACE_API_WRITE_CHARS_UTF8 = 48,
    WS_TRACE_API_WRITE_BYTES = 49,
    WS_TRACE_API_PUSH_BYTES = 50,
    WS_TRACE_API_PULL_BYTES = 51,
    WS_TRACE_API_WRITE_END_ELEMENT = 52,
    WS_TRACE_API_WRITE_TEXT = 53,
    WS_TRACE_API_WRITE_START_CDATA = 54,
    WS_TRACE_API_WRITE_END_CDATA = 55,
    WS_TRACE_API_WRITE_NODE = 56,
    WS_TRACE_API_PREFIX_FROM_NAMESPACE = 57,
    WS_TRACE_API_GET_WRITER_POSITION = 58,
    WS_TRACE_API_SET_WRITER_POSITION = 59,
    WS_TRACE_API_MOVE_WRITER = 60,
    WS_TRACE_API_TRIM_XML_WHITESPACE = 61,
    WS_TRACE_API_VERIFY_XML_NCNAME = 62,
    WS_TRACE_API_XML_STRING_EQUALS = 63,
    WS_TRACE_API_NAMESPACE_FROM_PREFIX = 64,
    WS_TRACE_API_READ_QUALIFIED_NAME = 65,
    WS_TRACE_API_GET_XML_ATTRIBUTE = 66,
    WS_TRACE_API_COPY_NODE = 67,
    WS_TRACE_API_ASYNC_EXECUTE = 68,
    WS_TRACE_API_CREATE_CHANNEL = 69,
    WS_TRACE_API_OPEN_CHANNEL = 70,
    WS_TRACE_API_SEND_MESSAGE = 71,
    WS_TRACE_API_RECEIVE_MESSAGE = 72,
    WS_TRACE_API_REQUEST_REPLY = 73,
    WS_TRACE_API_SEND_REPLY_MESSAGE = 74,
    WS_TRACE_API_SEND_FAULT_MESSAGE_FOR_ERROR = 75,
    WS_TRACE_API_GET_CHANNEL_PROPERTY = 76,
    WS_TRACE_API_SET_CHANNEL_PROPERTY = 77,
    WS_TRACE_API_WRITE_MESSAGE_START = 78,
    WS_TRACE_API_WRITE_MESSAGE_END = 79,
    WS_TRACE_API_READ_MESSAGE_START = 80,
    WS_TRACE_API_READ_MESSAGE_END = 81,
    WS_TRACE_API_CLOSE_CHANNEL = 82,
    WS_TRACE_API_ABORT_CHANNEL = 83,
    WS_TRACE_API_FREE_CHANNEL = 84,
    WS_TRACE_API_RESET_CHANNEL = 85,
    WS_TRACE_API_ABANDON_MESSAGE = 86,
    WS_TRACE_API_SHUTDOWN_SESSION_CHANNEL = 87,
    WS_TRACE_API_GET_CONTEXT_PROPERTY = 88,
    WS_TRACE_API_GET_DICTIONARY = 89,
    WS_TRACE_API_READ_ENDPOINT_ADDRESS_EXTENSION = 90,
    WS_TRACE_API_CREATE_ERROR = 91,
    WS_TRACE_API_ADD_ERROR_STRING = 92,
    WS_TRACE_API_GET_ERROR_STRING = 93,
    WS_TRACE_API_COPY_ERROR = 94,
    WS_TRACE_API_GET_ERROR_PROPERTY = 95,
    WS_TRACE_API_SET_ERROR_PROPERTY = 96,
    WS_TRACE_API_RESET_ERROR = 97,
    WS_TRACE_API_FREE_ERROR = 98,
    WS_TRACE_API_GET_FAULT_ERROR_PROPERTY = 99,
    WS_TRACE_API_SET_FAULT_ERROR_PROPERTY = 100,
    WS_TRACE_API_CREATE_FAULT_FROM_ERROR = 101,
    WS_TRACE_API_SET_FAULT_ERROR_DETAIL = 102,
    WS_TRACE_API_GET_FAULT_ERROR_DETAIL = 103,
    WS_TRACE_API_CREATE_HEAP = 104,
    WS_TRACE_API_ALLOC = 105,
    WS_TRACE_API_GET_HEAP_PROPERTY = 106,
    WS_TRACE_API_RESET_HEAP = 107,
    WS_TRACE_API_FREE_HEAP = 108,
    WS_TRACE_API_CREATE_LISTENER = 109,
    WS_TRACE_API_OPEN_LISTENER = 110,
    WS_TRACE_API_ACCEPT_CHANNEL = 111,
    WS_TRACE_API_CLOSE_LISTENER = 112,
    WS_TRACE_API_ABORT_LISTENER = 113,
    WS_TRACE_API_RESET_LISTENER = 114,
    WS_TRACE_API_FREE_LISTENER = 115,
    WS_TRACE_API_GET_LISTENER_PROPERTY = 116,
    WS_TRACE_API_SET_LISTENER_PROPERTY = 117,
    WS_TRACE_API_CREATE_CHANNEL_FOR_LISTENER = 118,
    WS_TRACE_API_CREATE_MESSAGE = 119,
    WS_TRACE_API_CREATE_MESSAGE_FOR_CHANNEL = 120,
    WS_TRACE_API_INITIALIZE_MESSAGE = 121,
    WS_TRACE_API_RESET_MESSAGE = 122,
    WS_TRACE_API_FREE_MESSAGE = 123,
    WS_TRACE_API_GET_HEADER_ATTRIBUTES = 124,
    WS_TRACE_API_GET_HEADER = 125,
    WS_TRACE_API_GET_CUSTOM_HEADER = 126,
    WS_TRACE_API_REMOVE_HEADER = 127,
    WS_TRACE_API_SET_HEADER = 128,
    WS_TRACE_API_REMOVE_CUSTOM_HEADER = 129,
    WS_TRACE_API_ADD_CUSTOM_HEADER = 130,
    WS_TRACE_API_ADD_MAPPED_HEADER = 131,
    WS_TRACE_API_REMOVE_MAPPED_HEADER = 132,
    WS_TRACE_API_GET_MAPPED_HEADER = 133,
    WS_TRACE_API_WRITE_BODY = 134,
    WS_TRACE_API_READ_BODY = 135,
    WS_TRACE_API_WRITE_ENVELOPE_START = 136,
    WS_TRACE_API_WRITE_ENVELOPE_END = 137,
    WS_TRACE_API_READ_ENVELOPE_START = 138,
    WS_TRACE_API_READ_ENVELOPE_END = 139,
    WS_TRACE_API_GET_MESSAGE_PROPERTY = 140,
    WS_TRACE_API_SET_MESSAGE_PROPERTY = 141,
    WS_TRACE_API_ADDRESS_MESSAGE = 142,
    WS_TRACE_API_CHECK_MUST_UNDERSTAND_HEADERS = 143,
    WS_TRACE_API_MARK_HEADER_AS_UNDERSTOOD = 144,
    WS_TRACE_API_FILL_BODY = 145,
    WS_TRACE_API_FLUSH_BODY = 146,
    WS_TRACE_API_REQUEST_SECURITY_TOKEN = 147,
    WS_TRACE_API_GET_SECURITY_TOKEN_PROPERTY = 148,
    WS_TRACE_API_CREATE_XML_SECURITY_TOKEN = 149,
    WS_TRACE_API_FREE_SECURITY_TOKEN = 150,
    WS_TRACE_API_REVOKE_SECURITY_CONTEXT = 151,
    WS_TRACE_API_GET_SECURITY_CONTEXT_PROPERTY = 152,
    WS_TRACE_API_READ_ELEMENT_TYPE = 153,
    WS_TRACE_API_READ_ATTRIBUTE_TYPE = 154,
    WS_TRACE_API_READ_TYPE = 155,
    WS_TRACE_API_WRITE_ELEMENT_TYPE = 156,
    WS_TRACE_API_WRITE_ATTRIBUTE_TYPE = 157,
    WS_TRACE_API_WRITE_TYPE = 158,
    WS_TRACE_API_SERVICE_REGISTER_FOR_CANCEL = 159,
    WS_TRACE_API_GET_SERVICE_HOST_PROPERTY = 160,
    WS_TRACE_API_CREATE_SERVICE_HOST = 161,
    WS_TRACE_API_OPEN_SERVICE_HOST = 162,
    WS_TRACE_API_CLOSE_SERVICE_HOST = 163,
    WS_TRACE_API_ABORT_SERVICE_HOST = 164,
    WS_TRACE_API_FREE_SERVICE_HOST = 165,
    WS_TRACE_API_RESET_SERVICE_HOST = 166,
    WS_TRACE_API_GET_SERVICE_PROXY_PROPERTY = 167,
    WS_TRACE_API_CREATE_SERVICE_PROXY = 168,
    WS_TRACE_API_OPEN_SERVICE_PROXY = 169,
    WS_TRACE_API_CLOSE_SERVICE_PROXY = 170,
    WS_TRACE_API_ABORT_SERVICE_PROXY = 171,
    WS_TRACE_API_FREE_SERVICE_PROXY = 172,
    WS_TRACE_API_RESET_SERVICE_PROXY = 173,
    WS_TRACE_API_ABORT_CALL = 174,
    WS_TRACE_API_CALL = 175,
    WS_TRACE_API_DECODE_URL = 176,
    WS_TRACE_API_ENCODE_URL = 177,
    WS_TRACE_API_COMBINE_URL = 178,
    WS_TRACE_API_DATETIME_TO_FILETIME = 179,
    WS_TRACE_API_FILETIME_TO_DATETIME = 180,
    WS_TRACE_API_DUMP_MEMORY = 181,
    WS_TRACE_API_SET_AUTOFAIL = 182,
    WS_TRACE_API_CREATE_METADATA = 183,
    WS_TRACE_API_READ_METADATA = 184,
    WS_TRACE_API_FREE_METADATA = 185,
    WS_TRACE_API_RESET_METADATA = 186,
    WS_TRACE_API_GET_METADATA_PROPERTY = 187,
    WS_TRACE_API_GET_MISSING_METADATA_DOCUMENT_ADDRESS = 188,
    WS_TRACE_API_GET_METADATA_ENDPOINTS = 189,
    WS_TRACE_API_MATCH_POLICY_ALTERNATIVE = 190,
    WS_TRACE_API_GET_POLICY_PROPERTY = 191,
    WS_TRACE_API_GET_POLICY_ALTERNATIVE_COUNT = 192,
    WS_TRACE_API_WS_CREATE_SERVICE_PROXY_FROM_TEMPLATE = 193,
    WS_TRACE_API_WS_CREATE_SERVICE_HOST_FROM_TEMPLATE = 194,
} WS_TRACE_API;

typedef enum {
    WS_URL_HTTP_SCHEME_TYPE = 0,
    WS_URL_HTTPS_SCHEME_TYPE = 1,
    WS_URL_NETTCP_SCHEME_TYPE = 2,
    WS_URL_SOAPUDP_SCHEME_TYPE = 3,
} WS_URL_SCHEME_TYPE;

enum {
    WS_URL_FLAGS_ALLOW_HOST_WILDCARDS = 0x1,
    WS_URL_FLAGS_NO_PATH_COLLAPSE = 0x2,
    WS_URL_FLAGS_ZERO_TERMINATE = 0x4,
};

typedef enum {
    WS_DATETIME_FORMAT_UTC = 0,
    WS_DATETIME_FORMAT_LOCAL = 1,
    WS_DATETIME_FORMAT_NONE = 2,
} WS_DATETIME_FORMAT;

typedef enum {
    WS_METADATA_STATE_CREATED = 1,
    WS_METADATA_STATE_RESOLVED = 2,
    WS_METADATA_STATE_FAULTED = 3,
} WS_METADATA_STATE;

typedef enum {
    WS_METADATA_PROPERTY_STATE = 1,
    WS_METADATA_PROPERTY_HEAP_PROPERTIES = 2,
    WS_METADATA_PROPERTY_POLICY_PROPERTIES = 3,
    WS_METADATA_PROPERTY_HEAP_REQUESTED_SIZE = 4,
    WS_METADATA_PROPERTY_MAX_DOCUMENTS = 5,
    WS_METADATA_PROPERTY_HOST_NAMES = 6,
    WS_METADATA_PROPERTY_VERIFY_HOST_NAMES = 7,
} WS_METADATA_PROPERTY_ID;

typedef enum {
    WS_POLICY_STATE_CREATED = 1,
    WS_POLICY_STATE_FAULTED = 2,
} WS_POLICY_STATE;

typedef enum {
    WS_POLICY_PROPERTY_STATE = 1,
    WS_POLICY_PROPERTY_MAX_ALTERNATIVES = 2,
    WS_POLICY_PROPERTY_MAX_DEPTH = 3,
    WS_POLICY_PROPERTY_MAX_EXTENSIONS = 4,
} WS_POLICY_PROPERTY_ID;

typedef enum {
    WS_SSL_TRANSPORT_SECURITY_BINDING_CONSTRAINT_TYPE = 1,
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_CONSTRAINT_TYPE = 2,
    WS_HTTP_HEADER_AUTH_SECURITY_BINDING_CONSTRAINT_TYPE = 3,
    WS_USERNAME_MESSAGE_SECURITY_BINDING_CONSTRAINT_TYPE = 4,
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_CONSTRAINT_TYPE = 5,
    WS_ISSUED_TOKEN_MESSAGE_SECURITY_BINDING_CONSTRAINT_TYPE = 6,
    WS_CERT_MESSAGE_SECURITY_BINDING_CONSTRAINT_TYPE = 7,
    WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_CONSTRAINT_TYPE = 8,
} WS_SECURITY_BINDING_CONSTRAINT_TYPE;

typedef enum {
    WS_ENDPOINT_POLICY_EXTENSION_TYPE = 1,
} WS_POLICY_EXTENSION_TYPE;

typedef enum {
    WS_HTTP_BINDING_TEMPLATE_TYPE = 0,
    WS_HTTP_SSL_BINDING_TEMPLATE_TYPE = 1,
    WS_HTTP_HEADER_AUTH_BINDING_TEMPLATE_TYPE = 2,
    WS_HTTP_SSL_HEADER_AUTH_BINDING_TEMPLATE_TYPE = 3,
    WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE_TYPE = 4,
    WS_HTTP_SSL_KERBEROS_APREQ_BINDING_TEMPLATE_TYPE = 5,
    WS_TCP_BINDING_TEMPLATE_TYPE = 6,
    WS_TCP_SSPI_BINDING_TEMPLATE_TYPE = 7,
    WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE_TYPE = 8,
    WS_TCP_SSPI_KERBEROS_APREQ_BINDING_TEMPLATE_TYPE = 9,
    WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE = 10,
    WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE = 11,
    WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE = 12,
    WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE = 13,
} WS_BINDING_TEMPLATE_TYPE;

struct _CERT_CONTEXT;

struct _SecPkgContext_IssuerListInfoEx;

struct _WS_FAULT_CODE;

/* Callbacks */

typedef HRESULT (CALLBACK *WS_READ_CALLBACK) (void *callbackState, void *bytes, ULONG maxSize, ULONG *actualSize, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_WRITE_CALLBACK) (void *callbackState, const WS_BYTES *buffers, ULONG count, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_PUSH_BYTES_CALLBACK) (void *callbackState, WS_WRITE_CALLBACK writeCallback, void *writeCallbackState, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_PULL_BYTES_CALLBACK) (void *callbackState, void *bytes, ULONG maxSize, ULONG *actualSize, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_DYNAMIC_STRING_CALLBACK) (void *callbackState, const WS_XML_STRING *string, BOOL *found, ULONG *id, WS_ERROR *error);
typedef void (CALLBACK *WS_ASYNC_CALLBACK) (HRESULT errorCode, WS_CALLBACK_MODEL callbackModel, void *callbackState);
typedef HRESULT (CALLBACK *WS_ASYNC_FUNCTION) (HRESULT hr, WS_CALLBACK_MODEL callbackModel, void *callbackState, WS_ASYNC_OPERATION *next, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_CREATE_CHANNEL_CALLBACK) (WS_CHANNEL_TYPE channelType, const void *channelParameters, ULONG channelParametersSize, void **channelInstance, WS_ERROR *error);
typedef void (CALLBACK *WS_FREE_CHANNEL_CALLBACK) (void *channelInstance);
typedef HRESULT (CALLBACK *WS_RESET_CHANNEL_CALLBACK) (void *channelInstance, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ABORT_CHANNEL_CALLBACK) (void *channelInstance, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_OPEN_CHANNEL_CALLBACK) (void *channelInstance, const WS_ENDPOINT_ADDRESS *endpointAddress, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_CLOSE_CHANNEL_CALLBACK) (void *channelInstance, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_SET_CHANNEL_PROPERTY_CALLBACK) (void *channelInstance, WS_CHANNEL_PROPERTY_ID id, const void *value, ULONG valueSize, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_GET_CHANNEL_PROPERTY_CALLBACK) (void *channelInstance, WS_CHANNEL_PROPERTY_ID id, void *value, ULONG valueSize, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_READ_MESSAGE_START_CALLBACK) (void *channelInstance, WS_MESSAGE *message, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_READ_MESSAGE_END_CALLBACK) (void *channelInstance, WS_MESSAGE *message, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_WRITE_MESSAGE_START_CALLBACK) (void *channelInstance, WS_MESSAGE *message, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_WRITE_MESSAGE_END_CALLBACK) (void *channelInstance, WS_MESSAGE *message, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ABANDON_MESSAGE_CALLBACK) (void *channelInstance, WS_MESSAGE *message, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_SHUTDOWN_SESSION_CHANNEL_CALLBACK) (void *channelInstance, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_CREATE_ENCODER_CALLBACK) (void *createContext, WS_WRITE_CALLBACK writeCallback, void *writeContext, void **encoderContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ENCODER_GET_CONTENT_TYPE_CALLBACK) (void *encoderContext, const WS_STRING *contentType, WS_STRING *newContentType, WS_STRING *contentEncoding, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ENCODER_START_CALLBACK) (void *encoderContext, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ENCODER_ENCODE_CALLBACK) (void *encoderContext, const WS_BYTES *buffers, ULONG count, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ENCODER_END_CALLBACK) (void *encoderContext, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef void (CALLBACK *WS_FREE_ENCODER_CALLBACK) (void *encoderContext);
typedef HRESULT (CALLBACK *WS_CREATE_DECODER_CALLBACK) (void *createContext, WS_READ_CALLBACK readCallback, void *readContext, void **decoderContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_DECODER_GET_CONTENT_TYPE_CALLBACK) (void *decoderContext, const WS_STRING *contentType, const WS_STRING *contentEncoding, WS_STRING *newContentType, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_DECODER_START_CALLBACK) (void *encoderContext, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_DECODER_DECODE_CALLBACK) (void *encoderContext, void *buffer, ULONG maxLength, ULONG *length, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_DECODER_END_CALLBACK) (void *encoderContext, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef void (CALLBACK *WS_FREE_DECODER_CALLBACK) (void *decoderContext);
typedef HRESULT (CALLBACK *WS_HTTP_REDIRECT_CALLBACK) (void *state, const WS_STRING *originalUrl, const WS_STRING *newUrl);
typedef HRESULT (CALLBACK *WS_CREATE_LISTENER_CALLBACK) (WS_CHANNEL_TYPE channelType, const void *listenerParameters, ULONG listenerParametersSize, void **listenerInstance, WS_ERROR *error);
typedef void (CALLBACK *WS_FREE_LISTENER_CALLBACK) (void *listenerInstance);
typedef HRESULT (CALLBACK *WS_RESET_LISTENER_CALLBACK) (void *listenerInstance, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_OPEN_LISTENER_CALLBACK) (void *listenerInstance, const WS_STRING *url, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_CLOSE_LISTENER_CALLBACK) (void *listenerInstance, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_GET_LISTENER_PROPERTY_CALLBACK) (void *listenerInstance, WS_LISTENER_PROPERTY_ID id, void *value, ULONG valueSize, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_SET_LISTENER_PROPERTY_CALLBACK) (void *listenerInstance, WS_LISTENER_PROPERTY_ID id, const void *value, ULONG valueSize, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ACCEPT_CHANNEL_CALLBACK) (void *listenerInstance, void *channelInstance, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_ABORT_LISTENER_CALLBACK) (void *listenerInstance, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_CREATE_CHANNEL_FOR_LISTENER_CALLBACK) (void *listenerInstance, const void *channelParameters, ULONG channelParametersSize, void **channelInstance, WS_ERROR *error);
typedef void (CALLBACK *WS_MESSAGE_DONE_CALLBACK) (void *doneCallbackState);
typedef HRESULT (CALLBACK *WS_GET_CERT_CALLBACK) (void *getCertCallbackState, const WS_ENDPOINT_ADDRESS *targetAddress, const WS_STRING *viaUri, const struct _CERT_CONTEXT **cert, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_CERT_ISSUER_LIST_NOTIFICATION_CALLBACK) (void *certIssuerListNotificationCallbackState, const struct _SecPkgContext_IssuerListInfoEx *issuerList, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_VALIDATE_PASSWORD_CALLBACK) (void *passwordValidatorCallbackState, const WS_STRING *username, const WS_STRING *password, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_VALIDATE_SAML_CALLBACK) (void *samlValidatorCallbackState, WS_XML_BUFFER *samlAssertion, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_DURATION_COMPARISON_CALLBACK) (const WS_DURATION *duration1, const WS_DURATION *duration2, int *result, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_READ_TYPE_CALLBACK) (WS_XML_READER *reader, WS_TYPE_MAPPING typeMapping, const void *descriptionData, WS_HEAP *heap, void *value, ULONG valueSize, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_WRITE_TYPE_CALLBACK) (WS_XML_WRITER *writer, WS_TYPE_MAPPING typeMapping, const void *descriptionData, const void *value, ULONG valueSize, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_IS_DEFAULT_VALUE_CALLBACK) (const void *descriptionData, const void *value, const void *defaultValue, ULONG valueSize, BOOL *isDefault, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_SERVICE_MESSAGE_RECEIVE_CALLBACK) (const WS_OPERATION_CONTEXT *context, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef void (CALLBACK *WS_OPERATION_CANCEL_CALLBACK) (const WS_SERVICE_CANCEL_REASON reason, void *state);
typedef void (CALLBACK *WS_OPERATION_FREE_STATE_CALLBACK) (void *state);
typedef HRESULT (CALLBACK *WS_SERVICE_STUB_CALLBACK) (const WS_OPERATION_CONTEXT *context, void *frame, const void *callback, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_SERVICE_ACCEPT_CHANNEL_CALLBACK) (const WS_OPERATION_CONTEXT *context, void **channelState, const WS_ASYNC_CONTEXT *asyncContext, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_SERVICE_CLOSE_CHANNEL_CALLBACK) (const WS_OPERATION_CONTEXT *context, const WS_ASYNC_CONTEXT *asyncContext);
typedef HRESULT (CALLBACK *WS_SERVICE_SECURITY_CALLBACK) (const WS_OPERATION_CONTEXT *context, BOOL *authorized, WS_ERROR *error);
typedef HRESULT (CALLBACK *WS_PROXY_MESSAGE_CALLBACK) (WS_MESSAGE *message, WS_HEAP *heap, void *state, WS_ERROR *error);

/* structures */

struct _WS_XML_DICTIONARY {
    GUID guid;
    WS_XML_STRING *strings;
    ULONG stringCount;
    BOOL isConst;
};

struct _WS_XML_STRING {
    ULONG length;
    BYTE *bytes;
    WS_XML_DICTIONARY *dictionary;
    ULONG id;
};

struct _WS_XML_QNAME {
    WS_XML_STRING localName;
    WS_XML_STRING ns;
};

struct _WS_XML_NODE_POSITION {
    WS_XML_BUFFER *buffer;
    void *node;
};

struct _WS_XML_READER_PROPERTY {
    WS_XML_READER_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_XML_CANONICALIZATION_INCLUSIVE_PREFIXES {
    ULONG prefixCount;
    WS_XML_STRING *prefixes;
};

struct _WS_XML_CANONICALIZATION_PROPERTY {
    WS_XML_CANONICALIZATION_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_XML_WRITER_PROPERTY {
    WS_XML_WRITER_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_XML_BUFFER_PROPERTY {
    WS_XML_BUFFER_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_XML_TEXT {
    WS_XML_TEXT_TYPE textType;
};

struct _WS_XML_UTF8_TEXT {
    WS_XML_TEXT text;
    WS_XML_STRING value;
};

struct _WS_XML_UTF16_TEXT {
    WS_XML_TEXT text;
    BYTE *bytes;
    ULONG byteCount;
};

struct _WS_XML_BASE64_TEXT {
    WS_XML_TEXT text;
    BYTE *bytes;
    ULONG length;
};

struct _WS_XML_BOOL_TEXT {
    WS_XML_TEXT text;
    BOOL value;
};

struct _WS_XML_INT32_TEXT {
    WS_XML_TEXT text;
    __int32 value;
};

struct _WS_XML_INT64_TEXT {
    WS_XML_TEXT text;
    __int64 value;
};

struct _WS_XML_UINT64_TEXT {
    WS_XML_TEXT text;
    unsigned __int64 value;
};

struct _WS_XML_FLOAT_TEXT {
    WS_XML_TEXT text;
    float value;
};

struct _WS_XML_DOUBLE_TEXT {
    WS_XML_TEXT text;
    double value;
};

struct _WS_XML_DECIMAL_TEXT {
    WS_XML_TEXT text;
    DECIMAL value;
};

struct _WS_XML_GUID_TEXT {
    WS_XML_TEXT text;
    GUID value;
};

struct _WS_XML_UNIQUE_ID_TEXT {
    WS_XML_TEXT text;
    GUID value;
};

struct _WS_DATETIME {
    unsigned __int64 ticks;
    WS_DATETIME_FORMAT format;
};

struct _WS_XML_DATETIME_TEXT {
    WS_XML_TEXT text;
    WS_DATETIME value;
};

struct _WS_TIMESPAN {
    __int64 ticks;
};

struct _WS_XML_TIMESPAN_TEXT {
    WS_XML_TEXT text;
    WS_TIMESPAN value;
};

struct _WS_XML_QNAME_TEXT {
    WS_XML_TEXT text;
    WS_XML_STRING *prefix;
    WS_XML_STRING *localName;
    WS_XML_STRING *ns;
};

struct _WS_XML_LIST_TEXT {
    WS_XML_TEXT text;
    ULONG itemCount;
    WS_XML_TEXT **items;
};

struct _WS_XML_NODE {
    WS_XML_NODE_TYPE nodeType;
};

struct _WS_XML_ATTRIBUTE {
    BYTE singleQuote;
    BYTE isXmlNs;
    WS_XML_STRING *prefix;
    WS_XML_STRING *localName;
    WS_XML_STRING *ns;
    WS_XML_TEXT *value;
};

struct _WS_XML_ELEMENT_NODE {
    WS_XML_NODE node;
    WS_XML_STRING *prefix;
    WS_XML_STRING *localName;
    WS_XML_STRING *ns;
    ULONG attributeCount;
    WS_XML_ATTRIBUTE **attributes;
    BOOL isEmpty;
};

struct _WS_XML_TEXT_NODE {
    WS_XML_NODE node;
    WS_XML_TEXT *text;
};

struct _WS_XML_COMMENT_NODE {
    WS_XML_NODE node;
    WS_XML_STRING value;
};

struct _WS_XML_READER_INPUT {
    WS_XML_READER_INPUT_TYPE inputType;
};

struct _WS_XML_READER_BUFFER_INPUT {
    WS_XML_READER_INPUT input;
    void *encodedData;
    ULONG encodedDataSize;
};

struct _WS_XML_READER_STREAM_INPUT {
    WS_XML_READER_INPUT input;
    WS_READ_CALLBACK readCallback;
    void *readCallbackState;
};

struct _WS_XML_READER_ENCODING {
    WS_XML_READER_ENCODING_TYPE encodingType;
};

struct _WS_XML_READER_TEXT_ENCODING {
    WS_XML_READER_ENCODING encoding;
    WS_CHARSET charSet;
};

struct _WS_XML_READER_BINARY_ENCODING {
    WS_XML_READER_ENCODING encoding;
    WS_XML_DICTIONARY *staticDictionary;
    WS_XML_DICTIONARY *dynamicDictionary;
};

struct _WS_STRING {
    ULONG length;
    WCHAR *chars;
};

struct _WS_XML_READER_MTOM_ENCODING {
    WS_XML_READER_ENCODING encoding;
    WS_XML_READER_ENCODING *textEncoding;
    BOOL readMimeHeader;
    WS_STRING startInfo;
    WS_STRING boundary;
    WS_STRING startUri;
};

struct _WS_XML_READER_RAW_ENCODING {
    WS_XML_READER_ENCODING encoding;
};

struct _WS_XML_WRITER_ENCODING {
    WS_XML_WRITER_ENCODING_TYPE encodingType;
};

struct _WS_XML_WRITER_TEXT_ENCODING {
    WS_XML_WRITER_ENCODING encoding;
    WS_CHARSET charSet;
};

struct _WS_XML_WRITER_BINARY_ENCODING {
    WS_XML_WRITER_ENCODING encoding;
    WS_XML_DICTIONARY *staticDictionary;
    WS_DYNAMIC_STRING_CALLBACK dynamicStringCallback;
    void *dynamicStringCallbackState;
};

struct _WS_XML_WRITER_MTOM_ENCODING {
    WS_XML_WRITER_ENCODING encoding;
    WS_XML_WRITER_ENCODING *textEncoding;
    BOOL writeMimeHeader;
    WS_STRING boundary;
    WS_STRING startInfo;
    WS_STRING startUri;
    ULONG maxInlineByteCount;
};

struct _WS_XML_WRITER_RAW_ENCODING {
    WS_XML_WRITER_ENCODING encoding;
};

struct _WS_XML_WRITER_OUTPUT {
    WS_XML_WRITER_OUTPUT_TYPE outputType;
};

struct _WS_XML_WRITER_BUFFER_OUTPUT {
    WS_XML_WRITER_OUTPUT output;
};

struct _WS_XML_WRITER_STREAM_OUTPUT {
    WS_XML_WRITER_OUTPUT output;
    WS_WRITE_CALLBACK writeCallback;
    void *writeCallbackState;
};

struct _WS_XML_WRITER_PROPERTIES {
    WS_XML_WRITER_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_XML_READER_PROPERTIES {
    WS_XML_READER_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_ASYNC_CONTEXT {
    WS_ASYNC_CALLBACK callback;
    void *callbackState;
};

struct _WS_ASYNC_STATE {
    void *internal0;
    void *internal1;
    void *internal2;
    void *internal3;
    void *internal4;
};

struct _WS_ASYNC_OPERATION {
    WS_ASYNC_FUNCTION function;
};

struct _WS_CHANNEL_PROPERTY {
    WS_CHANNEL_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_CUSTOM_HTTP_PROXY {
    WS_STRING servers;
    WS_STRING bypass;
};

struct _WS_CHANNEL_PROPERTIES {
    WS_CHANNEL_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_CUSTOM_CHANNEL_CALLBACKS {
    WS_CREATE_CHANNEL_CALLBACK createChannelCallback;
    WS_FREE_CHANNEL_CALLBACK freeChannelCallback;
    WS_RESET_CHANNEL_CALLBACK resetChannelCallback;
    WS_OPEN_CHANNEL_CALLBACK openChannelCallback;
    WS_CLOSE_CHANNEL_CALLBACK closeChannelCallback;
    WS_ABORT_CHANNEL_CALLBACK abortChannelCallback;
    WS_GET_CHANNEL_PROPERTY_CALLBACK getChannelPropertyCallback;
    WS_SET_CHANNEL_PROPERTY_CALLBACK setChannelPropertyCallback;
    WS_WRITE_MESSAGE_START_CALLBACK writeMessageStartCallback;
    WS_WRITE_MESSAGE_END_CALLBACK writeMessageEndCallback;
    WS_READ_MESSAGE_START_CALLBACK readMessageStartCallback;
    WS_READ_MESSAGE_END_CALLBACK readMessageEndCallback;
    WS_ABANDON_MESSAGE_CALLBACK abandonMessageCallback;
    WS_SHUTDOWN_SESSION_CHANNEL_CALLBACK shutdownSessionChannelCallback;
};

struct _WS_HTTP_HEADER_MAPPING {
    WS_XML_STRING headerName;
    ULONG headerMappingOptions;
};

struct _WS_HTTP_MESSAGE_MAPPING {
    ULONG requestMappingOptions;
    ULONG responseMappingOptions;
    WS_HTTP_HEADER_MAPPING **requestHeaderMappings;
    ULONG requestHeaderMappingCount;
    WS_HTTP_HEADER_MAPPING **responseHeaderMappings;
    ULONG responseHeaderMappingCount;
};

struct _WS_ELEMENT_DESCRIPTION {
    WS_XML_STRING *elementLocalName;
    WS_XML_STRING *elementNs;
    WS_TYPE type;
    void *typeDescription;
};

struct _WS_MESSAGE_DESCRIPTION {
    WS_XML_STRING *action;
    WS_ELEMENT_DESCRIPTION *bodyElementDescription;
};

struct _WS_CHANNEL_ENCODER {
    void *createContext;
    WS_CREATE_ENCODER_CALLBACK createEncoderCallback;
    WS_ENCODER_GET_CONTENT_TYPE_CALLBACK encoderGetContentTypeCallback;
    WS_ENCODER_START_CALLBACK encoderStartCallback;
    WS_ENCODER_ENCODE_CALLBACK encoderEncodeCallback;
    WS_ENCODER_END_CALLBACK encoderEndCallback;
    WS_FREE_ENCODER_CALLBACK freeEncoderCallback;
};

struct _WS_CHANNEL_DECODER {
    void *createContext;
    WS_CREATE_DECODER_CALLBACK createDecoderCallback;
    WS_DECODER_GET_CONTENT_TYPE_CALLBACK decoderGetContentTypeCallback;
    WS_DECODER_START_CALLBACK decoderStartCallback;
    WS_DECODER_DECODE_CALLBACK decoderDecodeCallback;
    WS_DECODER_END_CALLBACK decoderEndCallback;
    WS_FREE_DECODER_CALLBACK freeDecoderCallback;
};

struct _WS_HTTP_REDIRECT_CALLBACK_CONTEXT {
    WS_HTTP_REDIRECT_CALLBACK callback;
    void *state;
};

struct _WS_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY_TYPE identityType;
};

struct _WS_ENDPOINT_ADDRESS {
    WS_STRING url;
    WS_XML_BUFFER *headers;
    WS_XML_BUFFER *extensions;
    WS_ENDPOINT_IDENTITY *identity;
};

struct _WS_DNS_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY identity;
    WS_STRING dns;
};

struct _WS_UPN_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY identity;
    WS_STRING upn;
};

struct _WS_SPN_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY identity;
    WS_STRING spn;
};

struct _WS_BYTES {
    ULONG length;
    BYTE *bytes;
};

struct _WS_RSA_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY identity;
    WS_BYTES modulus;
    WS_BYTES exponent;
};

struct _WS_CERT_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY identity;
    WS_BYTES rawCertificateData;
};

struct _WS_UNKNOWN_ENDPOINT_IDENTITY {
    WS_ENDPOINT_IDENTITY identity;
    WS_XML_BUFFER *element;
};

struct _WS_ERROR_PROPERTY {
    WS_ERROR_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_FAULT_REASON {
    WS_STRING text;
    WS_STRING lang;
};

struct _WS_FAULT_CODE {
    WS_XML_QNAME value;
    struct _WS_FAULT_CODE *subCode;
};

struct _WS_FAULT {
    WS_FAULT_CODE *code;
    WS_FAULT_REASON *reasons;
    ULONG reasonCount;
    WS_STRING actor;
    WS_STRING node;
    WS_XML_BUFFER *detail;
};

struct _WS_FAULT_DETAIL_DESCRIPTION {
    WS_XML_STRING *action;
    WS_ELEMENT_DESCRIPTION *detailElementDescription;
};

struct _WS_HEAP_PROPERTY {
    WS_HEAP_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_HEAP_PROPERTIES {
    WS_HEAP_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_LISTENER_PROPERTY {
    WS_LISTENER_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_DISALLOWED_USER_AGENT_SUBSTRINGS {
    ULONG subStringCount;
    WS_STRING **subStrings;
};

struct _WS_LISTENER_PROPERTIES {
    WS_LISTENER_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_HOST_NAMES {
    WS_STRING *hostNames;
    ULONG hostNameCount;
};

struct _WS_CUSTOM_LISTENER_CALLBACKS {
    WS_CREATE_LISTENER_CALLBACK createListenerCallback;
    WS_FREE_LISTENER_CALLBACK freeListenerCallback;
    WS_RESET_LISTENER_CALLBACK resetListenerCallback;
    WS_OPEN_LISTENER_CALLBACK openListenerCallback;
    WS_CLOSE_LISTENER_CALLBACK closeListenerCallback;
    WS_ABORT_LISTENER_CALLBACK abortListenerCallback;
    WS_GET_LISTENER_PROPERTY_CALLBACK getListenerPropertyCallback;
    WS_SET_LISTENER_PROPERTY_CALLBACK setListenerPropertyCallback;
    WS_CREATE_CHANNEL_FOR_LISTENER_CALLBACK createChannelForListenerCallback;
    WS_ACCEPT_CHANNEL_CALLBACK acceptChannelCallback;
};

struct _WS_MESSAGE_PROPERTY {
    WS_MESSAGE_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_MESSAGE_PROPERTIES {
    WS_MESSAGE_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SECURITY_ALGORITHM_PROPERTY {
    WS_SECURITY_ALGORITHM_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_SECURITY_ALGORITHM_SUITE {
    WS_SECURITY_ALGORITHM_ID canonicalizationAlgorithm;
    WS_SECURITY_ALGORITHM_ID digestAlgorithm;
    WS_SECURITY_ALGORITHM_ID symmetricSignatureAlgorithm;
    WS_SECURITY_ALGORITHM_ID asymmetricSignatureAlgorithm;
    WS_SECURITY_ALGORITHM_ID encryptionAlgorithm;
    WS_SECURITY_ALGORITHM_ID keyDerivationAlgorithm;
    WS_SECURITY_ALGORITHM_ID symmetricKeyWrapAlgorithm;
    WS_SECURITY_ALGORITHM_ID asymmetricKeyWrapAlgorithm;
    ULONG minSymmetricKeyLength;
    ULONG maxSymmetricKeyLength;
    ULONG minAsymmetricKeyLength;
    ULONG maxAsymmetricKeyLength;
    WS_SECURITY_ALGORITHM_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SECURITY_PROPERTY {
    WS_SECURITY_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_SECURITY_PROPERTIES {
    WS_SECURITY_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SECURITY_BINDING_PROPERTY {
    WS_SECURITY_BINDING_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_SECURITY_BINDING_PROPERTIES {
    WS_SECURITY_BINDING_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SERVICE_SECURITY_IDENTITIES {
    WS_STRING *serviceIdentities;
    ULONG serviceIdentityCount;
};

struct _WS_CERT_CREDENTIAL {
    WS_CERT_CREDENTIAL_TYPE credentialType;
};

struct _WS_SUBJECT_NAME_CERT_CREDENTIAL {
    WS_CERT_CREDENTIAL credential;
    ULONG storeLocation;
    WS_STRING storeName;
    WS_STRING subjectName;
};

struct _WS_THUMBPRINT_CERT_CREDENTIAL {
    WS_CERT_CREDENTIAL credential;
    ULONG storeLocation;
    WS_STRING storeName;
    WS_STRING thumbprint;
};

struct _WS_CUSTOM_CERT_CREDENTIAL {
    WS_CERT_CREDENTIAL credential;
    WS_GET_CERT_CALLBACK getCertCallback;
    void *getCertCallbackState;
    WS_CERT_ISSUER_LIST_NOTIFICATION_CALLBACK certIssuerListNotificationCallback;
    void *certIssuerListNotificationCallbackState;
};

struct _WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL {
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE credentialType;
};

struct _WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL {
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL credential;
    WS_STRING username;
    WS_STRING password;
    WS_STRING domain;
};

struct _WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL {
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL credential;
};

struct _WS_OPAQUE_WINDOWS_INTEGRATED_AUTH_CREDENTIAL {
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL credential;
    void *opaqueAuthIdentity;
};

struct _WS_USERNAME_CREDENTIAL {
    WS_USERNAME_CREDENTIAL_TYPE credentialType;
};

struct _WS_STRING_USERNAME_CREDENTIAL {
    WS_USERNAME_CREDENTIAL credential;
    WS_STRING username;
    WS_STRING password;
};

struct _WS_SECURITY_KEY_HANDLE {
    WS_SECURITY_KEY_HANDLE_TYPE keyHandleType;
};

struct _WS_RAW_SYMMETRIC_SECURITY_KEY_HANDLE {
    WS_SECURITY_KEY_HANDLE keyHandle;
    WS_BYTES rawKeyBytes;
};

struct _WS_NCRYPT_ASYMMETRIC_SECURITY_KEY_HANDLE {
    WS_SECURITY_KEY_HANDLE keyHandle;
    NCRYPT_KEY_HANDLE asymmetricKey;
};

struct _WS_CAPI_ASYMMETRIC_SECURITY_KEY_HANDLE {
    WS_SECURITY_KEY_HANDLE keyHandle;
    HCRYPTPROV provider;
    ULONG keySpec;
};

struct _WS_SECURITY_BINDING {
    WS_SECURITY_BINDING_TYPE bindingType;
    WS_SECURITY_BINDING_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SSL_TRANSPORT_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_CERT_CREDENTIAL *localCertCredential;
};

struct _WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL *clientCredential;
};

struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL *clientCredential;
};

struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL *clientCredential;
};

struct _WS_USERNAME_MESSAGE_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_USERNAME_CREDENTIAL *clientCredential;
    WS_VALIDATE_PASSWORD_CALLBACK passwordValidator;
    void *passwordValidatorCallbackState;
};

struct _WS_SECURITY_DESCRIPTION {
    WS_SECURITY_BINDING **securityBindings;
    ULONG securityBindingCount;
    WS_SECURITY_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_SECURITY_DESCRIPTION *bootstrapSecurityDescription;
};

struct _WS_SECURITY_CONTEXT_PROPERTY {
    WS_SECURITY_CONTEXT_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_XML_SECURITY_TOKEN_PROPERTY {
    WS_XML_SECURITY_TOKEN_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_XML_TOKEN_MESSAGE_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_SECURITY_TOKEN *xmlToken;
};

struct _WS_SAML_AUTHENTICATOR {
    WS_SAML_AUTHENTICATOR_TYPE authenticatorType;
};

struct _WS_CERT_SIGNED_SAML_AUTHENTICATOR {
    WS_SAML_AUTHENTICATOR authenticator;
    const struct _CERT_CONTEXT **trustedIssuerCerts;
    ULONG trustedIssuerCertCount;
    const struct _CERT_CONTEXT *decryptionCert;
    WS_VALIDATE_SAML_CALLBACK samlValidator;
    void *samlValidatorCallbackState;
};

struct _WS_SAML_MESSAGE_SECURITY_BINDING {
    WS_SECURITY_BINDING binding;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_SAML_AUTHENTICATOR *authenticator;
};

struct _WS_REQUEST_SECURITY_TOKEN_PROPERTY {
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_ANY_ATTRIBUTE {
    WS_XML_STRING localName;
    WS_XML_STRING ns;
    WS_XML_TEXT *value;
};

struct _WS_ANY_ATTRIBUTES {
    WS_ANY_ATTRIBUTE *attributes;
    ULONG attributeCount;
};

struct _WS_BOOL_DESCRIPTION {
    BOOL value;
};

struct _WS_GUID_DESCRIPTION {
    GUID value;
};

struct _WS_DATETIME_DESCRIPTION {
    WS_DATETIME minValue;
    WS_DATETIME maxValue;
};

struct _WS_DURATION {
    BOOL negative;
    ULONG years;
    ULONG months;
    ULONG days;
    ULONG hours;
    ULONG minutes;
    ULONG seconds;
    ULONG milliseconds;
    ULONG ticks;
};

struct _WS_DURATION_DESCRIPTION {
    WS_DURATION minValue;
    WS_DURATION maxValue;
    WS_DURATION_COMPARISON_CALLBACK comparer;
};

struct _WS_TIMESPAN_DESCRIPTION {
    WS_TIMESPAN minValue;
    WS_TIMESPAN maxValue;
};

struct _WS_UNIQUE_ID_DESCRIPTION {
    ULONG minCharCount;
    ULONG maxCharCount;
};

struct _WS_STRING_DESCRIPTION {
    ULONG minCharCount;
    ULONG maxCharCount;
};

struct _WS_XML_STRING_DESCRIPTION {
    ULONG minByteCount;
    ULONG maxByteCount;
};

struct _WS_XML_QNAME_DESCRIPTION {
    ULONG minLocalNameByteCount;
    ULONG maxLocalNameByteCount;
    ULONG minNsByteCount;
    ULONG maxNsByteCount;
};

struct _WS_CHAR_ARRAY_DESCRIPTION {
    ULONG minCharCount;
    ULONG maxCharCount;
};

struct _WS_BYTE_ARRAY_DESCRIPTION {
    ULONG minByteCount;
    ULONG maxByteCount;
};

struct _WS_UTF8_ARRAY_DESCRIPTION {
    ULONG minByteCount;
    ULONG maxByteCount;
};

struct _WS_WSZ_DESCRIPTION {
    ULONG minCharCount;
    ULONG maxCharCount;
};

struct _WS_INT8_DESCRIPTION {
    char minValue;
    char maxValue;
};

struct _WS_UINT8_DESCRIPTION {
    BYTE minValue;
    BYTE maxValue;
};

struct _WS_INT16_DESCRIPTION {
    short minValue;
    short maxValue;
};

struct _WS_UINT16_DESCRIPTION {
    USHORT minValue;
    USHORT maxValue;
};

struct _WS_INT32_DESCRIPTION {
    int minValue;
    int maxValue;
};

struct _WS_UINT32_DESCRIPTION {
    ULONG minValue;
    ULONG maxValue;
};

struct _WS_INT64_DESCRIPTION {
    __int64 minValue;
    __int64 maxValue;
};

struct _WS_UINT64_DESCRIPTION {
    unsigned __int64 minValue;
    unsigned __int64 maxValue;
};

struct _WS_FLOAT_DESCRIPTION {
    float minValue;
    float maxValue;
};

struct _WS_DOUBLE_DESCRIPTION {
    double minValue;
    double maxValue;
};

struct _WS_DECIMAL_DESCRIPTION {
    DECIMAL minValue;
    DECIMAL maxValue;
};

struct _WS_BYTES_DESCRIPTION {
    ULONG minByteCount;
    ULONG maxByteCount;
};

struct _WS_ENUM_VALUE {
    int value;
    WS_XML_STRING *name;
};

struct _WS_ENUM_DESCRIPTION {
    WS_ENUM_VALUE *values;
    ULONG valueCount;
    ULONG maxByteCount;
    ULONG *nameIndices;
};

struct _WS_ITEM_RANGE {
    ULONG minItemCount;
    ULONG maxItemCount;
};

struct _WS_DEFAULT_VALUE {
    void *value;
    ULONG valueSize;
};

struct _WS_FIELD_DESCRIPTION {
    WS_FIELD_MAPPING mapping;
    WS_XML_STRING *localName;
    WS_XML_STRING *ns;
    WS_TYPE type;
    void *typeDescription;
    ULONG offset;
    ULONG options;
    WS_DEFAULT_VALUE *defaultValue;
    ULONG countOffset;
    WS_XML_STRING *itemLocalName;
    WS_XML_STRING *itemNs;
    WS_ITEM_RANGE *itemRange;
};

struct _WS_UNION_FIELD_DESCRIPTION {
    int value;
    WS_FIELD_DESCRIPTION field;
};

struct _WS_STRUCT_DESCRIPTION {
    ULONG size;
    ULONG alignment;
    WS_FIELD_DESCRIPTION **fields;
    ULONG fieldCount;
    WS_XML_STRING *typeLocalName;
    WS_XML_STRING *typeNs;
    WS_STRUCT_DESCRIPTION *parentType;
    WS_STRUCT_DESCRIPTION **subTypes;
    ULONG subTypeCount;
    ULONG structOptions;
};

struct _WS_UNION_DESCRIPTION {
    ULONG size;
    ULONG alignment;
    WS_UNION_FIELD_DESCRIPTION **fields;
    ULONG fieldCount;
    ULONG enumOffset;
    int noneEnumValue;
    ULONG *valueIndices;
};

struct _WS_ENDPOINT_ADDRESS_DESCRIPTION {
    WS_ADDRESSING_VERSION addressingVersion;
};

struct _WS_FAULT_DESCRIPTION {
    WS_ENVELOPE_VERSION envelopeVersion;
};

struct _WS_VOID_DESCRIPTION {
    ULONG size;
};

struct _WS_CUSTOM_TYPE_DESCRIPTION {
    ULONG size;
    ULONG alignment;
    WS_READ_TYPE_CALLBACK readCallback;
    WS_WRITE_TYPE_CALLBACK writeCallback;
    void *descriptionData;
    WS_IS_DEFAULT_VALUE_CALLBACK isDefaultValueCallback;
};

struct _WS_ATTRIBUTE_DESCRIPTION {
    WS_XML_STRING *attributeLocalName;
    WS_XML_STRING *attributeNs;
    WS_TYPE type;
    void *typeDescription;
};

struct _WS_PARAMETER_DESCRIPTION {
    WS_PARAMETER_TYPE parameterType;
    USHORT inputMessageIndex;
    USHORT outputMessageIndex;
};

struct _WS_OPERATION_DESCRIPTION {
    ULONG versionInfo;
    WS_MESSAGE_DESCRIPTION *inputMessageDescription;
    WS_MESSAGE_DESCRIPTION *outputMessageDescription;
    ULONG inputMessageOptions;
    ULONG outputMessageOptions;
    USHORT parameterCount;
    WS_PARAMETER_DESCRIPTION *parameterDescription;
    WS_SERVICE_STUB_CALLBACK stubCallback;
    WS_OPERATION_STYLE style;
};

struct _WS_CONTRACT_DESCRIPTION {
    ULONG operationCount;
    WS_OPERATION_DESCRIPTION **operations;
};

struct _WS_SERVICE_CONTRACT {
    const WS_CONTRACT_DESCRIPTION *contractDescription;
    WS_SERVICE_MESSAGE_RECEIVE_CALLBACK defaultMessageHandlerCallback;
    const void *methodTable;
};

struct _WS_SERVICE_PROPERTY {
    WS_SERVICE_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_SERVICE_ENDPOINT_PROPERTY {
    WS_SERVICE_ENDPOINT_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_SERVICE_PROPERTY_ACCEPT_CALLBACK {
    WS_SERVICE_ACCEPT_CHANNEL_CALLBACK callback;
};

struct _WS_SERVICE_METADATA_DOCUMENT {
    WS_XML_STRING *content;
    WS_STRING *name;
};

struct _WS_SERVICE_METADATA {
    ULONG documentCount;
    WS_SERVICE_METADATA_DOCUMENT **documents;
    WS_XML_STRING *serviceName;
    WS_XML_STRING *serviceNs;
};

struct _WS_SERVICE_PROPERTY_CLOSE_CALLBACK {
    WS_SERVICE_CLOSE_CHANNEL_CALLBACK callback;
};

struct _WS_SERVICE_ENDPOINT_METADATA {
    WS_XML_STRING *portName;
    WS_XML_STRING *bindingName;
    WS_XML_STRING *bindingNs;
};

struct _WS_SERVICE_ENDPOINT {
    WS_ENDPOINT_ADDRESS address;
    WS_CHANNEL_BINDING channelBinding;
    WS_CHANNEL_TYPE channelType;
    const WS_SECURITY_DESCRIPTION *securityDescription;
    const WS_SERVICE_CONTRACT *contract;
    WS_SERVICE_SECURITY_CALLBACK authorizationCallback;
    const WS_SERVICE_ENDPOINT_PROPERTY *properties;
    ULONG propertyCount;
    WS_CHANNEL_PROPERTIES channelProperties;
};

struct _WS_PROXY_PROPERTY {
    WS_PROXY_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_PROXY_MESSAGE_CALLBACK_CONTEXT {
    WS_PROXY_MESSAGE_CALLBACK callback;
    void *state;
};

struct _WS_CALL_PROPERTY {
    WS_CALL_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_URL {
    WS_URL_SCHEME_TYPE scheme;
};

struct _WS_HTTP_URL {
    WS_URL url;
    WS_STRING host;
    USHORT port;
    WS_STRING portAsString;
    WS_STRING path;
    WS_STRING query;
    WS_STRING fragment;
};

struct _WS_HTTPS_URL {
    WS_URL url;
    WS_STRING host;
    USHORT port;
    WS_STRING portAsString;
    WS_STRING path;
    WS_STRING query;
    WS_STRING fragment;
};

struct _WS_NETTCP_URL {
    WS_URL url;
    WS_STRING host;
    USHORT port;
    WS_STRING portAsString;
    WS_STRING path;
    WS_STRING query;
    WS_STRING fragment;
};

struct _WS_SOAPUDP_URL {
    WS_URL url;
    WS_STRING host;
    USHORT port;
    WS_STRING portAsString;
    WS_STRING path;
    WS_STRING query;
    WS_STRING fragment;
};

struct _WS_UNIQUE_ID {
    WS_STRING uri;
    GUID guid;
};

struct _WS_BUFFERS {
    ULONG bufferCount;
    WS_BYTES *buffers;
};

struct _WS_METADATA_ENDPOINT {
    WS_ENDPOINT_ADDRESS endpointAddress;
    WS_POLICY *endpointPolicy;
    WS_XML_STRING *portName;
    WS_XML_STRING *serviceName;
    WS_XML_STRING *serviceNs;
    WS_XML_STRING *bindingName;
    WS_XML_STRING *bindingNs;
    WS_XML_STRING *portTypeName;
    WS_XML_STRING *portTypeNs;
};

struct _WS_METADATA_ENDPOINTS {
    WS_METADATA_ENDPOINT *endpoints;
    ULONG endpointCount;
};

struct _WS_METADATA_PROPERTY {
    WS_METADATA_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_POLICY_PROPERTY {
    WS_POLICY_PROPERTY_ID id;
    void *value;
    ULONG valueSize;
};

struct _WS_POLICY_PROPERTIES {
    WS_POLICY_PROPERTY *properties;
    ULONG propertyCount;
};

struct _WS_SECURITY_BINDING_PROPERTY_CONSTRAINT {
    WS_SECURITY_BINDING_PROPERTY_ID id;
    void *allowedValues;
    ULONG allowedValuesSize;
    struct {
        WS_SECURITY_BINDING_PROPERTY securityBindingProperty;
    } out;
};

struct _WS_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT_TYPE type;
    WS_SECURITY_BINDING_PROPERTY_CONSTRAINT *propertyConstraints;
    ULONG propertyConstraintCount;
};

struct _WS_SSL_TRANSPORT_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
    struct {
        BOOL clientCertCredentialRequired;
    } out;
};

struct _WS_USERNAME_MESSAGE_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
};

struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
};

struct _WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
};

struct _WS_CERT_MESSAGE_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
};

struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
};

struct _WS_REQUEST_SECURITY_TOKEN_PROPERTY_CONSTRAINT {
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_ID id;
    void *allowedValues;
    ULONG allowedValuesSize;
    struct {
        WS_REQUEST_SECURITY_TOKEN_PROPERTY requestSecurityTokenProperty;
    } out;
};

struct _WS_ISSUED_TOKEN_MESSAGE_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_XML_STRING *claimConstraints;
    ULONG claimConstraintCount;
    WS_REQUEST_SECURITY_TOKEN_PROPERTY_CONSTRAINT *requestSecurityTokenPropertyConstraints;
    ULONG requestSecurityTokenPropertyConstraintCount;
    struct {
        WS_ENDPOINT_ADDRESS *issuerAddress;
        WS_XML_BUFFER *requestSecurityTokenTemplate;
    } out;
};

struct _WS_SECURITY_PROPERTY_CONSTRAINT {
    WS_SECURITY_PROPERTY_ID id;
    void *allowedValues;
    ULONG allowedValuesSize;
    struct {
        WS_SECURITY_PROPERTY securityProperty;
    } out;
};

struct _WS_SECURITY_CONSTRAINTS {
    WS_SECURITY_PROPERTY_CONSTRAINT *securityPropertyConstraints;
    ULONG securityPropertyConstraintCount;
    WS_SECURITY_BINDING_CONSTRAINT **securityBindingConstraints;
    ULONG securityBindingConstraintCount;
};

struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_CONSTRAINT {
    WS_SECURITY_BINDING_CONSTRAINT bindingConstraint;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
    WS_SECURITY_CONSTRAINTS *bootstrapSecurityConstraint;
};

struct _WS_CHANNEL_PROPERTY_CONSTRAINT {
    WS_CHANNEL_PROPERTY_ID id;
    void *allowedValues;
    ULONG allowedValuesSize;
    struct {
        WS_CHANNEL_PROPERTY channelProperty;
    } out;
};

struct _WS_POLICY_EXTENSION {
    WS_POLICY_EXTENSION_TYPE type;
};

struct _WS_ENDPOINT_POLICY_EXTENSION {
    WS_POLICY_EXTENSION policyExtension;
    WS_XML_STRING *assertionName;
    WS_XML_STRING *assertionNs;
    struct {
        WS_XML_BUFFER *assertionValue;
    } out;
};

struct _WS_POLICY_CONSTRAINTS {
    WS_CHANNEL_BINDING channelBinding;
    WS_CHANNEL_PROPERTY_CONSTRAINT *channelPropertyConstraints;
    ULONG channelPropertyConstraintCount;
    WS_SECURITY_CONSTRAINTS *securityConstraints;
    WS_POLICY_EXTENSION **policyExtensions;
    ULONG policyExtensionCount;
};

struct _WS_HTTP_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
};

struct _WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
};

struct _WS_HTTP_SSL_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sslTransportSecurityBinding;
};

struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
};

struct _WS_HTTP_HEADER_AUTH_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_HTTP_HEADER_AUTH_SECURITY_BINDING_POLICY_DESCRIPTION httpHeaderAuthSecurityBinding;
};

struct _WS_HTTP_SSL_HEADER_AUTH_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sslTransportSecurityBinding;
    WS_HTTP_HEADER_AUTH_SECURITY_BINDING_POLICY_DESCRIPTION httpHeaderAuthSecurityBinding;
};

struct _WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
};

struct _WS_HTTP_SSL_USERNAME_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sslTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION usernameMessageSecurityBinding;
};

struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
};

struct _WS_HTTP_SSL_KERBEROS_APREQ_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sslTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION kerberosApreqMessageSecurityBinding;
};

struct _WS_TCP_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
};

struct _WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
};

struct _WS_TCP_SSPI_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sspiTransportSecurityBinding;
};

struct _WS_TCP_SSPI_USERNAME_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sspiTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION usernameMessageSecurityBinding;
};

struct _WS_TCP_SSPI_KERBEROS_APREQ_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sspiTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION kerberosApreqMessageSecurityBinding;
};

struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_MESSAGE_SECURITY_USAGE bindingUsage;
};

struct _WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION {
    WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION securityContextMessageSecurityBinding;
    WS_SECURITY_PROPERTIES securityProperties;
};

struct _WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sspiTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION kerberosApreqMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION securityContextSecurityBinding;
};

struct _WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSPI_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sspiTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION usernameMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION securityContextSecurityBinding;
};

struct _WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sslTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION usernameMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION securityContextSecurityBinding;
};

struct _WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_POLICY_DESCRIPTION sslTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_POLICY_DESCRIPTION kerberosApreqMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_POLICY_DESCRIPTION securityContextSecurityBinding;
};

struct _WS_HTTP_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
};

struct _WS_TCP_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
};

struct _WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_CERT_CREDENTIAL *localCertCredential;
};

struct _WS_HTTP_SSL_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE sslTransportSecurityBinding;
};

struct _WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL *clientCredential;
};

struct _WS_HTTP_HEADER_AUTH_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TEMPLATE httpHeaderAuthSecurityBinding;
};

struct _WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL *clientCredential;
};

struct _WS_TCP_SSPI_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE sspiTransportSecurityBinding;
};

struct _WS_HTTP_SSL_HEADER_AUTH_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE sslTransportSecurityBinding;
    WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TEMPLATE httpHeaderAuthSecurityBinding;
};

struct _WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_USERNAME_CREDENTIAL *clientCredential;
    WS_VALIDATE_PASSWORD_CALLBACK passwordValidator;
    void *passwordValidatorCallbackState;
};

struct _WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE sslTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE usernameMessageSecurityBinding;
};

struct _WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
    WS_WINDOWS_INTEGRATED_AUTH_CREDENTIAL *clientCredential;
};

struct _WS_HTTP_SSL_KERBEROS_APREQ_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE sslTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE kerberosApreqMessageSecurityBinding;
};

struct _WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE sspiTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE usernameMessageSecurityBinding;
};

struct _WS_TCP_SSPI_KERBEROS_APREQ_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE sspiTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE kerberosApreqMessageSecurityBinding;
};

struct _WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_BINDING_PROPERTIES securityBindingProperties;
};

struct _WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE {
    WS_SECURITY_CONTEXT_MESSAGE_SECURITY_BINDING_TEMPLATE securityContextMessageSecurityBinding;
    WS_SECURITY_PROPERTIES securityProperties;
};

struct _WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE sslTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE usernameMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE securityContextSecurityBinding;
};

struct _WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_SSL_TRANSPORT_SECURITY_BINDING_TEMPLATE sslTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE kerberosApreqMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE securityContextSecurityBinding;
};

struct _WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE sspiTransportSecurityBinding;
    WS_USERNAME_MESSAGE_SECURITY_BINDING_TEMPLATE usernameMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE securityContextSecurityBinding;
};

struct _WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE {
    WS_CHANNEL_PROPERTIES channelProperties;
    WS_SECURITY_PROPERTIES securityProperties;
    WS_TCP_SSPI_TRANSPORT_SECURITY_BINDING_TEMPLATE sspiTransportSecurityBinding;
    WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TEMPLATE kerberosApreqMessageSecurityBinding;
    WS_SECURITY_CONTEXT_SECURITY_BINDING_TEMPLATE securityContextSecurityBinding;
};

/* macros */
#define WS_XML_STRING_DICTIONARY_VALUE(S,D,I)  { sizeof(S)-1, (BYTE*)RTL_CONST_CAST(char*)(S), RTL_CONST_CAST(WS_XML_DICTIONARY*)(D), I }
#define WS_XML_STRING_VALUE(S)  { sizeof(S)-1, (BYTE*)RTL_CONST_CAST(char*)(S), NULL, 0 }
#define WS_XML_STRING_NULL  { 0, NULL, NULL, NULL }
#define WS_STRING_VALUE(S)  { WsCountOf(S) - 1, S }
#define WS_STRING_EMPTY  { 0, NULL }
#define WsCountOf(arrayValue)  RTL_NUMBER_OF(arrayValue)
#define WsOffsetOf(type,field)  FIELD_OFFSET(type, field)

/* functions */
HRESULT WINAPI WsStartReaderCanonicalization(WS_XML_READER *, WS_WRITE_CALLBACK, void *, const WS_XML_CANONICALIZATION_PROPERTY *, ULONG, WS_ERROR *);
HRESULT WINAPI WsEndReaderCanonicalization(WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsStartWriterCanonicalization(WS_XML_WRITER *, WS_WRITE_CALLBACK, void *, const WS_XML_CANONICALIZATION_PROPERTY *, ULONG, WS_ERROR *);
HRESULT WINAPI WsEndWriterCanonicalization(WS_XML_WRITER *, WS_ERROR *);
HRESULT WINAPI WsCreateXmlBuffer(WS_HEAP *, const WS_XML_BUFFER_PROPERTY *, ULONG, WS_XML_BUFFER **, WS_ERROR *);
HRESULT WINAPI WsRemoveNode(const WS_XML_NODE_POSITION *, WS_ERROR *);
HRESULT WINAPI WsCreateReader(const WS_XML_READER_PROPERTY *, ULONG, WS_XML_READER **, WS_ERROR *);
HRESULT WINAPI WsSetInput(WS_XML_READER *reader, const WS_XML_READER_ENCODING *, const WS_XML_READER_INPUT *, const WS_XML_READER_PROPERTY *, ULONG, WS_ERROR *);
HRESULT WINAPI WsSetInputToBuffer(WS_XML_READER *, WS_XML_BUFFER *, const WS_XML_READER_PROPERTY *, ULONG, WS_ERROR *);
void WINAPI WsFreeReader(WS_XML_READER *);
HRESULT WINAPI WsGetReaderProperty(WS_XML_READER *, WS_XML_READER_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsGetReaderNode(WS_XML_READER *, const WS_XML_NODE **, WS_ERROR *);
HRESULT WINAPI WsFillReader(WS_XML_READER *, ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsReadStartElement(WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsReadToStartElement(WS_XML_READER *, const WS_XML_STRING *, const WS_XML_STRING *, BOOL *, WS_ERROR *);
HRESULT WINAPI WsReadStartAttribute(WS_XML_READER *, ULONG, WS_ERROR *);
HRESULT WINAPI WsReadEndAttribute(WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsReadNode(WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsSkipNode(WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsReadEndElement(WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsFindAttribute(WS_XML_READER *, const WS_XML_STRING *, const WS_XML_STRING *, BOOL, ULONG *, WS_ERROR *);
HRESULT WINAPI WsReadValue(WS_XML_READER *, WS_VALUE_TYPE, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsReadChars(WS_XML_READER *, WCHAR *, ULONG, ULONG *, WS_ERROR *);
HRESULT WINAPI WsReadCharsUtf8(WS_XML_READER *, BYTE *, ULONG, ULONG *, WS_ERROR *);
HRESULT WINAPI WsReadBytes(WS_XML_READER *, void *, ULONG, ULONG *, WS_ERROR *);
HRESULT WINAPI WsReadArray(WS_XML_READER *, const WS_XML_STRING *, const WS_XML_STRING *, WS_VALUE_TYPE, void *, ULONG, ULONG, ULONG, ULONG *, WS_ERROR *);
HRESULT WINAPI WsGetReaderPosition(WS_XML_READER *, WS_XML_NODE_POSITION *, WS_ERROR *);
HRESULT WINAPI WsSetReaderPosition(WS_XML_READER *, const WS_XML_NODE_POSITION *, WS_ERROR *);
HRESULT WINAPI WsMoveReader(WS_XML_READER *, WS_MOVE_TO, BOOL *, WS_ERROR *);
HRESULT WINAPI WsCreateWriter(const WS_XML_WRITER_PROPERTY *, ULONG, WS_XML_WRITER **, WS_ERROR *);
void WINAPI WsFreeWriter(WS_XML_WRITER *);
HRESULT WINAPI WsSetOutput(WS_XML_WRITER *, const WS_XML_WRITER_ENCODING *, const WS_XML_WRITER_OUTPUT *, const WS_XML_WRITER_PROPERTY *, ULONG, WS_ERROR *);
HRESULT WINAPI WsSetOutputToBuffer(WS_XML_WRITER *, WS_XML_BUFFER *, const WS_XML_WRITER_PROPERTY *, ULONG, WS_ERROR *);
HRESULT WINAPI WsGetWriterProperty(WS_XML_WRITER *, WS_XML_WRITER_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsFlushWriter(WS_XML_WRITER *, ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsWriteStartElement(WS_XML_WRITER *, const WS_XML_STRING *, const WS_XML_STRING *, const WS_XML_STRING *, WS_ERROR *);
HRESULT WINAPI WsWriteEndStartElement(WS_XML_WRITER *, WS_ERROR *);
HRESULT WINAPI WsWriteXmlnsAttribute(WS_XML_WRITER *, const WS_XML_STRING *, const WS_XML_STRING *, BOOL, WS_ERROR *);
HRESULT WINAPI WsWriteStartAttribute(WS_XML_WRITER *, const WS_XML_STRING *, const WS_XML_STRING *, const WS_XML_STRING *, BOOL, WS_ERROR *);
HRESULT WINAPI WsWriteEndAttribute(WS_XML_WRITER *, WS_ERROR *);
HRESULT WINAPI WsWriteValue(WS_XML_WRITER *, WS_VALUE_TYPE, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteXmlBuffer(WS_XML_WRITER *, WS_XML_BUFFER *, WS_ERROR *);
HRESULT WINAPI WsReadXmlBuffer(WS_XML_READER *, WS_HEAP *, WS_XML_BUFFER **, WS_ERROR *);
HRESULT WINAPI WsWriteXmlBufferToBytes(WS_XML_WRITER *, WS_XML_BUFFER *, const WS_XML_WRITER_ENCODING *, const WS_XML_WRITER_PROPERTY *, ULONG, WS_HEAP *, void **, ULONG *, WS_ERROR *);
HRESULT WINAPI WsReadXmlBufferFromBytes(WS_XML_READER *, const WS_XML_READER_ENCODING *, const WS_XML_READER_PROPERTY *, ULONG, const void *, ULONG, WS_HEAP *, WS_XML_BUFFER **, WS_ERROR *);
HRESULT WINAPI WsWriteArray(WS_XML_WRITER *, const WS_XML_STRING *, const WS_XML_STRING *, WS_VALUE_TYPE, const void *, ULONG, ULONG, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteQualifiedName(WS_XML_WRITER *, const WS_XML_STRING *, const WS_XML_STRING *, const WS_XML_STRING *, WS_ERROR *);
HRESULT WINAPI WsWriteChars(WS_XML_WRITER *, const WCHAR *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteCharsUtf8(WS_XML_WRITER *, const BYTE *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteBytes(WS_XML_WRITER *, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsPushBytes(WS_XML_WRITER *, WS_PUSH_BYTES_CALLBACK, void *, WS_ERROR *);
HRESULT WINAPI WsPullBytes(WS_XML_WRITER *, WS_PULL_BYTES_CALLBACK, void *, WS_ERROR *);
HRESULT WINAPI WsWriteEndElement(WS_XML_WRITER *, WS_ERROR *);
HRESULT WINAPI WsWriteText(WS_XML_WRITER *, const WS_XML_TEXT *, WS_ERROR *);
HRESULT WINAPI WsWriteStartCData(WS_XML_WRITER *, WS_ERROR *);
HRESULT WINAPI WsWriteEndCData(WS_XML_WRITER *, WS_ERROR *);
HRESULT WINAPI WsWriteNode(WS_XML_WRITER *, const WS_XML_NODE *, WS_ERROR *);
HRESULT WINAPI WsGetPrefixFromNamespace(WS_XML_WRITER *, const WS_XML_STRING *, BOOL, const WS_XML_STRING **, WS_ERROR *);
HRESULT WINAPI WsGetWriterPosition(WS_XML_WRITER *, WS_XML_NODE_POSITION *, WS_ERROR *);
HRESULT WINAPI WsSetWriterPosition(WS_XML_WRITER *, const WS_XML_NODE_POSITION *, WS_ERROR *);
HRESULT WINAPI WsMoveWriter(WS_XML_WRITER *, WS_MOVE_TO, BOOL *, WS_ERROR *);
HRESULT WINAPI WsTrimXmlWhitespace(WCHAR *, ULONG, WCHAR **, ULONG *, WS_ERROR *);
HRESULT WINAPI WsVerifyXmlNCName(const WCHAR *, ULONG, WS_ERROR *);
HRESULT WINAPI WsXmlStringEquals(const WS_XML_STRING *, const WS_XML_STRING *, WS_ERROR *);
HRESULT WINAPI WsGetNamespaceFromPrefix(WS_XML_READER *, const WS_XML_STRING *, BOOL, const WS_XML_STRING **, WS_ERROR *);
HRESULT WINAPI WsReadQualifiedName(WS_XML_READER *, WS_HEAP *, WS_XML_STRING *, WS_XML_STRING *, WS_XML_STRING *, WS_ERROR *);
HRESULT WINAPI WsGetXmlAttribute(WS_XML_READER *, const WS_XML_STRING *, WS_HEAP *, WCHAR **, ULONG *, WS_ERROR *);
HRESULT WINAPI WsCopyNode(WS_XML_WRITER *, WS_XML_READER *, WS_ERROR *);
HRESULT WINAPI WsAsyncExecute(WS_ASYNC_STATE *, WS_ASYNC_FUNCTION, WS_CALLBACK_MODEL, void *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsCreateChannel(WS_CHANNEL_TYPE, WS_CHANNEL_BINDING, const WS_CHANNEL_PROPERTY *, ULONG, const WS_SECURITY_DESCRIPTION *, WS_CHANNEL **, WS_ERROR *);
HRESULT WINAPI WsOpenChannel(WS_CHANNEL *, const WS_ENDPOINT_ADDRESS *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsSendMessage(WS_CHANNEL *, WS_MESSAGE *, const WS_MESSAGE_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsReceiveMessage(WS_CHANNEL *, WS_MESSAGE *, const WS_MESSAGE_DESCRIPTION **, ULONG, WS_RECEIVE_OPTION, WS_READ_OPTION, WS_HEAP *, void *, ULONG, ULONG *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsRequestReply(WS_CHANNEL *, WS_MESSAGE *, const WS_MESSAGE_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, WS_MESSAGE *, const WS_MESSAGE_DESCRIPTION *, WS_READ_OPTION, WS_HEAP *, void *, ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsSendReplyMessage(WS_CHANNEL *, WS_MESSAGE *, const WS_MESSAGE_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, WS_MESSAGE *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsSendFaultMessageForError(WS_CHANNEL *, WS_MESSAGE *, WS_ERROR *, HRESULT, WS_FAULT_DISCLOSURE, WS_MESSAGE *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsGetChannelProperty(WS_CHANNEL *, WS_CHANNEL_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsSetChannelProperty(WS_CHANNEL *, WS_CHANNEL_PROPERTY_ID, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteMessageStart(WS_CHANNEL *, WS_MESSAGE *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsWriteMessageEnd(WS_CHANNEL *, WS_MESSAGE *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsReadMessageStart(WS_CHANNEL *, WS_MESSAGE *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsReadMessageEnd(WS_CHANNEL *, WS_MESSAGE *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsCloseChannel(WS_CHANNEL *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsAbortChannel(WS_CHANNEL *, WS_ERROR *);
void WINAPI WsFreeChannel(WS_CHANNEL *);
HRESULT WINAPI WsResetChannel(WS_CHANNEL *, WS_ERROR *);
HRESULT WINAPI WsAbandonMessage(WS_CHANNEL *, WS_MESSAGE *, WS_ERROR *);
HRESULT WINAPI WsShutdownSessionChannel(WS_CHANNEL *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsGetOperationContextProperty(const WS_OPERATION_CONTEXT *, const WS_OPERATION_CONTEXT_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsGetDictionary(WS_ENCODING, WS_XML_DICTIONARY **, WS_ERROR *);
HRESULT WINAPI WsReadEndpointAddressExtension(WS_XML_READER *, WS_ENDPOINT_ADDRESS *, WS_ENDPOINT_ADDRESS_EXTENSION_TYPE, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsCreateError(const WS_ERROR_PROPERTY *, ULONG, WS_ERROR **);
HRESULT WINAPI WsAddErrorString(WS_ERROR *, const WS_STRING *);
HRESULT WINAPI WsGetErrorString(WS_ERROR *, ULONG, WS_STRING *);
HRESULT WINAPI WsCopyError(WS_ERROR *, WS_ERROR *);
HRESULT WINAPI WsGetErrorProperty(WS_ERROR *, WS_ERROR_PROPERTY_ID, void *, ULONG);
HRESULT WINAPI WsSetErrorProperty(WS_ERROR *, WS_ERROR_PROPERTY_ID, const void *, ULONG);
HRESULT WINAPI WsResetError(WS_ERROR *);
void WINAPI WsFreeError(WS_ERROR *);
HRESULT WINAPI WsGetFaultErrorProperty(WS_ERROR *, WS_FAULT_ERROR_PROPERTY_ID, void *, ULONG);
HRESULT WINAPI WsSetFaultErrorProperty(WS_ERROR *, WS_FAULT_ERROR_PROPERTY_ID, const void *, ULONG);
HRESULT WINAPI WsCreateFaultFromError(WS_ERROR *, HRESULT, WS_FAULT_DISCLOSURE, WS_HEAP *, WS_FAULT *);
HRESULT WINAPI WsSetFaultErrorDetail(WS_ERROR *, const WS_FAULT_DETAIL_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG);
HRESULT WINAPI WsGetFaultErrorDetail(WS_ERROR *, const WS_FAULT_DETAIL_DESCRIPTION *, WS_READ_OPTION, WS_HEAP *, void *, ULONG);
HRESULT WINAPI WsCreateHeap(SIZE_T, SIZE_T, const WS_HEAP_PROPERTY *, ULONG, WS_HEAP **, WS_ERROR *);
HRESULT WINAPI WsAlloc(WS_HEAP *, SIZE_T, void **, WS_ERROR *);
HRESULT WINAPI WsGetHeapProperty(WS_HEAP *, WS_HEAP_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsResetHeap(WS_HEAP *, WS_ERROR *);
void WINAPI WsFreeHeap(WS_HEAP *);
HRESULT WINAPI WsCreateListener(WS_CHANNEL_TYPE, WS_CHANNEL_BINDING, const WS_LISTENER_PROPERTY *, ULONG, const WS_SECURITY_DESCRIPTION *, WS_LISTENER **, WS_ERROR *);
HRESULT WINAPI WsOpenListener(WS_LISTENER *, const WS_STRING *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsAcceptChannel(WS_LISTENER *, WS_CHANNEL *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsCloseListener(WS_LISTENER *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsAbortListener(WS_LISTENER *, WS_ERROR *);
HRESULT WINAPI WsResetListener(WS_LISTENER *, WS_ERROR *);
void WINAPI WsFreeListener(WS_LISTENER *);
HRESULT WINAPI WsGetListenerProperty(WS_LISTENER *, WS_LISTENER_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsSetListenerProperty(WS_LISTENER *, WS_LISTENER_PROPERTY_ID, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsCreateChannelForListener(WS_LISTENER *, const WS_CHANNEL_PROPERTY *, ULONG, WS_CHANNEL **, WS_ERROR *);
HRESULT WINAPI WsCreateMessage(WS_ENVELOPE_VERSION, WS_ADDRESSING_VERSION, const WS_MESSAGE_PROPERTY *, ULONG, WS_MESSAGE **, WS_ERROR *);
HRESULT WINAPI WsCreateMessageForChannel(WS_CHANNEL *, const WS_MESSAGE_PROPERTY *, ULONG, WS_MESSAGE **, WS_ERROR *);
HRESULT WINAPI WsInitializeMessage(WS_MESSAGE *, WS_MESSAGE_INITIALIZATION, WS_MESSAGE *, WS_ERROR *);
HRESULT WINAPI WsResetMessage(WS_MESSAGE *, WS_ERROR *);
void WINAPI WsFreeMessage(WS_MESSAGE *);
HRESULT WINAPI WsGetHeaderAttributes(WS_MESSAGE *, WS_XML_READER *, ULONG *, WS_ERROR *);
HRESULT WINAPI WsGetHeader(WS_MESSAGE *, WS_HEADER_TYPE, WS_TYPE, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsGetCustomHeader(WS_MESSAGE *, const WS_ELEMENT_DESCRIPTION *, WS_REPEATING_HEADER_OPTION, ULONG, WS_READ_OPTION, WS_HEAP *, void *, ULONG, ULONG *, WS_ERROR *);
HRESULT WINAPI WsRemoveHeader(WS_MESSAGE *, WS_HEADER_TYPE, WS_ERROR *);
HRESULT WINAPI WsSetHeader(WS_MESSAGE *, WS_HEADER_TYPE, WS_TYPE, WS_WRITE_OPTION, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsRemoveCustomHeader(WS_MESSAGE *, const WS_XML_STRING *, const WS_XML_STRING *, WS_ERROR *);
HRESULT WINAPI WsAddCustomHeader(WS_MESSAGE *, const WS_ELEMENT_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, ULONG, WS_ERROR *);
HRESULT WINAPI WsAddMappedHeader(WS_MESSAGE *, const WS_XML_STRING *, WS_TYPE, WS_WRITE_OPTION, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsRemoveMappedHeader(WS_MESSAGE *, const WS_XML_STRING *, WS_ERROR *);
HRESULT WINAPI WsGetMappedHeader(WS_MESSAGE *, const WS_XML_STRING *, WS_REPEATING_HEADER_OPTION, ULONG, WS_TYPE, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteBody(WS_MESSAGE *, const WS_ELEMENT_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsReadBody(WS_MESSAGE *, const WS_ELEMENT_DESCRIPTION *, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteEnvelopeStart(WS_MESSAGE *, WS_XML_WRITER *, WS_MESSAGE_DONE_CALLBACK, void *, WS_ERROR *);
HRESULT WINAPI WsWriteEnvelopeEnd(WS_MESSAGE *, WS_ERROR *);
HRESULT WINAPI WsReadEnvelopeStart(WS_MESSAGE *, WS_XML_READER *, WS_MESSAGE_DONE_CALLBACK, void *, WS_ERROR *);
HRESULT WINAPI WsReadEnvelopeEnd(WS_MESSAGE *, WS_ERROR *);
HRESULT WINAPI WsGetMessageProperty(WS_MESSAGE *, WS_MESSAGE_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsSetMessageProperty(WS_MESSAGE *, WS_MESSAGE_PROPERTY_ID, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsAddressMessage(WS_MESSAGE *, const WS_ENDPOINT_ADDRESS *, WS_ERROR *);
HRESULT WINAPI WsCheckMustUnderstandHeaders(WS_MESSAGE *, WS_ERROR *);
HRESULT WINAPI WsMarkHeaderAsUnderstood(WS_MESSAGE *, const WS_XML_NODE_POSITION *, WS_ERROR *);
HRESULT WINAPI WsFillBody(WS_MESSAGE *, ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsFlushBody(WS_MESSAGE *, ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsRequestSecurityToken(WS_CHANNEL *, const WS_REQUEST_SECURITY_TOKEN_PROPERTY *, ULONG, WS_SECURITY_TOKEN **, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsGetSecurityTokenProperty(WS_SECURITY_TOKEN *, WS_SECURITY_TOKEN_PROPERTY_ID, void *, ULONG, WS_HEAP *, WS_ERROR *);
HRESULT WINAPI WsCreateXmlSecurityToken(WS_XML_BUFFER *, WS_SECURITY_KEY_HANDLE *, const WS_XML_SECURITY_TOKEN_PROPERTY *, ULONG, WS_SECURITY_TOKEN **, WS_ERROR *);
void WINAPI WsFreeSecurityToken(WS_SECURITY_TOKEN *);
HRESULT WINAPI WsRevokeSecurityContext(WS_SECURITY_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsGetSecurityContextProperty(WS_SECURITY_CONTEXT *, WS_SECURITY_CONTEXT_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsReadElement(WS_XML_READER *, const WS_ELEMENT_DESCRIPTION *, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsReadAttribute(WS_XML_READER *, const WS_ATTRIBUTE_DESCRIPTION *, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsReadType(WS_XML_READER *, WS_TYPE_MAPPING, WS_TYPE, const void *, WS_READ_OPTION, WS_HEAP *, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteElement(WS_XML_WRITER *, const WS_ELEMENT_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteAttribute(WS_XML_WRITER *, const WS_ATTRIBUTE_DESCRIPTION *, WS_WRITE_OPTION, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsWriteType(WS_XML_WRITER *, WS_TYPE_MAPPING, WS_TYPE, const void *, WS_WRITE_OPTION, const void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsRegisterOperationForCancel(const WS_OPERATION_CONTEXT *, WS_OPERATION_CANCEL_CALLBACK, WS_OPERATION_FREE_STATE_CALLBACK, void *, WS_ERROR *);
HRESULT WINAPI WsGetServiceHostProperty(WS_SERVICE_HOST *, const WS_SERVICE_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsCreateServiceHost(const WS_SERVICE_ENDPOINT **, const USHORT, const WS_SERVICE_PROPERTY *, ULONG, WS_SERVICE_HOST **, WS_ERROR *);
HRESULT WINAPI WsOpenServiceHost(WS_SERVICE_HOST *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsCloseServiceHost(WS_SERVICE_HOST *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsAbortServiceHost(WS_SERVICE_HOST *, WS_ERROR *);
void WINAPI WsFreeServiceHost(WS_SERVICE_HOST *);
HRESULT WINAPI WsResetServiceHost(WS_SERVICE_HOST *, WS_ERROR *);
HRESULT WINAPI WsGetServiceProxyProperty(WS_SERVICE_PROXY *, const WS_PROXY_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsCreateServiceProxy(const WS_CHANNEL_TYPE, const WS_CHANNEL_BINDING, const WS_SECURITY_DESCRIPTION *, const WS_PROXY_PROPERTY *, const ULONG, const WS_CHANNEL_PROPERTY *, const ULONG, WS_SERVICE_PROXY **, WS_ERROR *);
HRESULT WINAPI WsOpenServiceProxy(WS_SERVICE_PROXY *, const WS_ENDPOINT_ADDRESS *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsCloseServiceProxy(WS_SERVICE_PROXY *, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsAbortServiceProxy(WS_SERVICE_PROXY *, WS_ERROR *);
void WINAPI WsFreeServiceProxy(WS_SERVICE_PROXY *);
HRESULT WINAPI WsResetServiceProxy(WS_SERVICE_PROXY *, WS_ERROR *);
HRESULT WINAPI WsAbandonCall(WS_SERVICE_PROXY *, ULONG, WS_ERROR *);
HRESULT WINAPI WsCall(WS_SERVICE_PROXY *, const WS_OPERATION_DESCRIPTION *, const void **, WS_HEAP *, const WS_CALL_PROPERTY *, const ULONG, const WS_ASYNC_CONTEXT *, WS_ERROR *);
HRESULT WINAPI WsDecodeUrl(const WS_STRING *, ULONG, WS_HEAP *, WS_URL **, WS_ERROR *);
HRESULT WINAPI WsEncodeUrl(const WS_URL *, ULONG, WS_HEAP *, WS_STRING *, WS_ERROR *);
HRESULT WINAPI WsCombineUrl(const WS_STRING *, const WS_STRING *, ULONG, WS_HEAP *, WS_STRING *, WS_ERROR *);
HRESULT WINAPI WsDateTimeToFileTime(const WS_DATETIME *, FILETIME *, WS_ERROR *);
HRESULT WINAPI WsFileTimeToDateTime(const FILETIME *, WS_DATETIME *, WS_ERROR *);
HRESULT WINAPI WsCreateMetadata(const WS_METADATA_PROPERTY *, ULONG, WS_METADATA **, WS_ERROR *);
HRESULT WINAPI WsReadMetadata(WS_METADATA *, WS_XML_READER *, const WS_STRING *, WS_ERROR *);
void WINAPI WsFreeMetadata(WS_METADATA *);
HRESULT WINAPI WsResetMetadata(WS_METADATA *, WS_ERROR *);
HRESULT WINAPI WsGetMetadataProperty(WS_METADATA *, WS_METADATA_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsGetMissingMetadataDocumentAddress(WS_METADATA *, WS_ENDPOINT_ADDRESS **, WS_ERROR *);
HRESULT WINAPI WsGetMetadataEndpoints(WS_METADATA *, WS_METADATA_ENDPOINTS *, WS_ERROR *);
HRESULT WINAPI WsMatchPolicyAlternative(WS_POLICY *, ULONG, WS_POLICY_CONSTRAINTS *, BOOL, WS_HEAP *, WS_ERROR *);
HRESULT WINAPI WsGetPolicyProperty(WS_POLICY *, WS_POLICY_PROPERTY_ID, void *, ULONG, WS_ERROR *);
HRESULT WINAPI WsGetPolicyAlternativeCount(WS_POLICY *, ULONG *, WS_ERROR *);
HRESULT WINAPI WsCreateServiceProxyFromTemplate(WS_CHANNEL_TYPE, const WS_PROXY_PROPERTY *, const ULONG, WS_BINDING_TEMPLATE_TYPE, void *, ULONG, const void *, ULONG, WS_SERVICE_PROXY **, WS_ERROR *);
HRESULT WINAPI WsCreateServiceEndpointFromTemplate(WS_CHANNEL_TYPE, const WS_SERVICE_ENDPOINT_PROPERTY *, ULONG, const WS_STRING *, const WS_SERVICE_CONTRACT *, WS_SERVICE_SECURITY_CALLBACK, WS_HEAP *, WS_BINDING_TEMPLATE_TYPE, void *, ULONG, const void *, ULONG, WS_SERVICE_ENDPOINT **, WS_ERROR *);

/* errors */
#ifndef FACILITY_WEBSERVICES
#define FACILITY_WEBSERVICES  0x3d
#define WS_S_ASYNC  0x003D0000
#define WS_S_END  0x003D0001
#define WS_E_INVALID_FORMAT  0x803D0000
#define WS_E_OBJECT_FAULTED  0x803D0001
#define WS_E_NUMERIC_OVERFLOW  0x803D0002
#define WS_E_INVALID_OPERATION  0x803D0003
#define WS_E_OPERATION_ABORTED  0x803D0004
#define WS_E_ENDPOINT_ACCESS_DENIED  0x803D0005
#define WS_E_OPERATION_TIMED_OUT  0x803D0006
#define WS_E_OPERATION_ABANDONED  0x803D0007
#define WS_E_QUOTA_EXCEEDED  0x803D0008
#define WS_E_NO_TRANSLATION_AVAILABLE  0x803D0009
#define WS_E_SECURITY_VERIFICATION_FAILURE  0x803D000A
#define WS_E_ADDRESS_IN_USE  0x803D000B
#define WS_E_ADDRESS_NOT_AVAILABLE  0x803D000C
#define WS_E_ENDPOINT_NOT_FOUND  0x803D000D
#define WS_E_ENDPOINT_NOT_AVAILABLE  0x803D000E
#define WS_E_ENDPOINT_FAILURE  0x803D000F
#define WS_E_ENDPOINT_UNREACHABLE  0x803D0010
#define WS_E_ENDPOINT_ACTION_NOT_SUPPORTED  0x803D0011
#define WS_E_ENDPOINT_TOO_BUSY  0x803D0012
#define WS_E_ENDPOINT_FAULT_RECEIVED  0x803D0013
#define WS_E_ENDPOINT_DISCONNECTED  0x803D0014
#define WS_E_PROXY_FAILURE  0x803D0015
#define WS_E_PROXY_ACCESS_DENIED  0x803D0016
#define WS_E_NOT_SUPPORTED  0x803D0017
#define WS_E_PROXY_REQUIRES_BASIC_AUTH  0x803D0018
#define WS_E_PROXY_REQUIRES_DIGEST_AUTH  0x803D0019
#define WS_E_PROXY_REQUIRES_NTLM_AUTH  0x803D001A
#define WS_E_PROXY_REQUIRES_NEGOTIATE_AUTH  0x803D001B
#define WS_E_SERVER_REQUIRES_BASIC_AUTH  0x803D001C
#define WS_E_SERVER_REQUIRES_DIGEST_AUTH  0x803D001D
#define WS_E_SERVER_REQUIRES_NTLM_AUTH  0x803D001E
#define WS_E_SERVER_REQUIRES_NEGOTIATE_AUTH  0x803D001F
#define WS_E_INVALID_ENDPOINT_URL  0x803D0020
#define WS_E_OTHER  0x803D0021
#define WS_E_SECURITY_TOKEN_EXPIRED  0x803D0022
#define WS_E_SECURITY_SYSTEM_FAILURE  0x803D0023
#endif /* FACILITY_WEBSERVICES */

#if __POCC__ >= 290
#pragma warn(pop)
#endif

#ifdef __cplusplus
}
#endif

#endif /* _WEBSERVICES_H */
