enumeración WS_TYPE_MAPPING (webservices.h)

Cómo un WS_TYPE se asigna a o desde XML cuando se serializa o deserializa.

Sintaxis

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;

Constantes

 
WS_ELEMENT_TYPE_MAPPING
Valor: 1
Se usa al leer o escribir un elemento donde el tipo
corresponde al tipo del elemento .
La definición del tipo puede incluir asignaciones a atributos,
text, o elementos secundarios del elemento.


La siguiente secuencia de llamada se usa al escribir un elemento:



syntax<br><br>WsWriteStartElement(...)<br>WsWriteType(..., WS_ELEMENT_TYPE_MAPPING, ...)<br>WsWriteEndElement(...)<br>

La siguiente secuencia de llamada se usa al leer un elemento:



syntax<br><br>WsReadToStartElement(...)?<br>WsReadType(..., WS_ELEMENT_TYPE_MAPPING, ...)<br>
WS_ATTRIBUTE_TYPE_MAPPING
Valor: 2
Esto se usa al leer o escribir el valor de un único atributo. La definición
del tipo no debe requerir ninguna asignación a atributos o elementos secundarios.


La siguiente secuencia de llamada se usa al escribir un valor de atributo.



syntax<br><br>WsWriteStartAttribute(...)<br>WsWriteType(..., WS_ATTRIBUTE_TYPE_MAPPING, ...)<br>WsWriteEndAttribute(...)<br>

La siguiente secuencia de llamada se usa al leer un valor de atributo.



syntax<br><br>WsFindAttribute(...)<br>WsReadStartAttribute(...)<br>WsReadType(..., WS_ATTRIBUTE_TYPE_MAPPING, ...)<br>WsReadEndAttribute(...)<br>
WS_ELEMENT_CONTENT_TYPE_MAPPING
Valor: 3
Se usa cuando el tipo corresponde a todo o a parte de .
content (texto y elementos secundarios) de un elemento.
La definición del tipo puede incluir asignaciones a texto o secundario.
elementos, pero no deben incluir ningún atributo.


La siguiente secuencia de llamada se usa al escribir el contenido.
de un elemento :



syntax<br><br>WsWriteStartElement(...)<br>// Write attributes, if any<br>// Write other element content, if any<br>WsWriteType(..., WS_ELEMENT_CONTENT_TYPE_MAPPING, ...)<br>// Write other element content, if any<br>WsWriteEndElement(...)<br>

La siguiente secuencia de llamada se usa al leer el contenido de
un elemento :



syntax<br><br>WsReadToStartElement(...)<br>// Read attributes, if any<br>WsReadStartElement(...)<br>// Read other element content, if any<br>WsReadType(..., WS_ELEMENT_CONTENT_TYPE_MAPPING, ...)<br>// Read other element content, if any<br>WsReadEndElement(...)<br>
WS_ANY_ELEMENT_TYPE_MAPPING
Valor: 4
Se usa cuando el tipo corresponde a la completa
elemento , incluido el nombre y el espacio de nombres del elemento.
La definición puede incluir atributos y elementos secundarios
y texto.


La siguiente secuencia de llamada se usa al escribir
un elemento :



syntax<br><br>WsWriteType(..., WS_ANY_ELEMENT_TYPE_MAPPING, ...)<br>

La siguiente secuencia de llamada se usa al leer el contenido de
un elemento :



syntax<br><br>WsReadToStartElement(...)?<br>WsReadType(..., WS_ANY_ELEMENT_TYPE_MAPPING, ...)<br>

Comentarios

Consulte la documentación de cada WS_TYPE para la que se admiten los valores de WS_TYPE_MAPPING .

Requisitos

   
Cliente mínimo compatible Windows 7 [aplicaciones de escritorio | Aplicaciones para UWP]
Servidor mínimo compatible Windows Server 2008 R2 [aplicaciones de escritorio | Aplicaciones para UWP]
Encabezado webservices.h