WsCreateServiceProxyFromTemplate, fonction (webservices.h)
Routine d’assistance pour la création d’un proxy de service à partir de modèles de stratégie.
Syntaxe
HRESULT WsCreateServiceProxyFromTemplate(
[in] WS_CHANNEL_TYPE channelType,
const WS_PROXY_PROPERTY *properties,
[in] const ULONG propertyCount,
[in] WS_BINDING_TEMPLATE_TYPE templateType,
void *templateValue,
[in] ULONG templateSize,
[in] const void *templateDescription,
[in] ULONG templateDescriptionSize,
WS_SERVICE_PROXY **serviceProxy,
[in, optional] WS_ERROR *error
);
Paramètres
[in] channelType
Valeur d’énumération WS_CHANNEL_TYPE représentant le type de canal pour le proxy de service.
properties
Tableau de structures WS_PROXY_PROPERTY contenant des propriétés facultatives pour le proxy de service.
La valeur de ce paramètre peut être NULL, auquel cas le paramètre propertyCount doit être égal à 0 (zéro).
[in] propertyCount
Nombre de propriétés dans le tableau de propriétés .
[in] templateType
Valeur d’énumération WS_BINDING_TEMPLATE_TYPE représentant le type de modèles utilisés pour créer le proxy de service.
Pour plus d’informations, consultez les remarques .
templateValue
Structure de modèle facultative à créer et à remplir par une application. Cette structure de modèle doit être cohérente avec le type de modèle d’entrée (dans le templateType). Lorsque le paramètre templateValue a la valeur NULL, il équivaut à la structure de modèle correspondante initialisée à zéro.
Pour plus d’informations, consultez les remarques .
[in] templateSize
Taille, en octets, de la structure du modèle (dans le paramètre templateValue ).
[in] templateDescription
Description de templateValue. Cela doit correspondre à templateType.
Pour plus d’informations, consultez les remarques .
[in] templateDescriptionSize
Taille de la description du modèle.
serviceProxy
En cas de réussite, un pointeur qui reçoit l’adresse du WS_SERVICE_PROXY structure représentant le nouveau proxy de service.
Lorsque vous n’avez plus besoin de cette structure, vous devez la libérer en appelant WsFreeServiceProxy.
[in, optional] error
Pointeur vers une structure de WS_ERROR qui reçoit des informations d’erreur supplémentaires en cas d’échec de la fonction.
Valeur retournée
Si la fonction réussit, elle retourne NO_ERROR ; sinon, elle retourne un code d’erreur HRESULT.
Remarques
WsCreateServiceProxyFromTemplate crée la structure WS_SERVICE_PROXY à partir de modèles de stratégie d’entrée et d’entrées utilisateur supplémentaires.
Le tableau suivant montre le mappage entre les valeurs templateType et les types de données correspondants à utiliser dans templateValue et templateDescription.
templateType | templateValue | templateDescription |
---|---|---|
WS_HTTP_BINDING_TEMPLATE_TYPE | WS_HTTP_BINDING_TEMPLATE | WS_HTTP_POLICY_DESCRIPTION |
WS_HTTP_SSL_BINDING_TEMPLATE_TYPE | WS_HTTP_SSL_BINDING_TEMPLATE | WS_HTTP_SSL_POLICY_DESCRIPTION |
WS_HTTP_HEADER_AUTH_BINDING_TEMPLATE_TYPE | WS_HTTP_HEADER_AUTH_BINDING_TEMPLATE | WS_HTTP_HEADER_AUTH_POLICY_DESCRIPTION |
WS_HTTP_SSL_HEADER_AUTH_BINDING_TEMPLATE_TYPE | WS_HTTP_SSL_HEADER_AUTH_BINDING_TEMPLATE | WS_HTTP_SSL_HEADER_AUTH_POLICY_DESCRIPTION |
WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE_TYPE | WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE | WS_HTTP_SSL_USERNAME_POLICY_DESCRIPTION |
WS_HTTP_SSL_KERBEROS_APREQ_BINDING_TEMPLATE_TYPE | WS_HTTP_SSL_KERBEROS_APREQ_BINDING_TEMPLATE | WS_HTTP_SSL_KERBEROS_APREQ_POLICY_DESCRIPTION |
WS_TCP_BINDING_TEMPLATE_TYPE | WS_TCP_BINDING_TEMPLATE | WS_TCP_POLICY_DESCRIPTION |
WS_TCP_SSPI_BINDING_TEMPLATE_TYPE | WS_TCP_SSPI_BINDING_TEMPLATE | WS_TCP_SSPI_POLICY_DESCRIPTION |
WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE_TYPE | WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE | WS_TCP_SSPI_USERNAME_POLICY_DESCRIPTION |
WS_TCP_SSPI_KERBEROS_APREQ_BINDING_TEMPLATE_TYPE | WS_TCP_SSPI_KERBEROS_APREQ_BINDING_TEMPLATE | WS_TCP_SSPI_KERBEROS_APREQ_POLICY_DESCRIPTION |
WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE | WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE | WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION |
WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE | WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE | WS_HTTP_SSL_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION |
WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE | WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE | WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_POLICY_DESCRIPTION |
WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE_TYPE | WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_BINDING_TEMPLATE | WS_TCP_SSPI_KERBEROS_APREQ_SECURITY_CONTEXT_POLICY_DESCRIPTION |
Configuration requise
Client minimal pris en charge | Windows 7 [applications de bureau | Applications UWP] |
Serveur minimal pris en charge | Windows Server 2008 R2 [applications de bureau | Applications UWP] |
Plateforme cible | Windows |
En-tête | webservices.h |
Bibliothèque | WebServices.lib |
DLL | WebServices.dll |
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour