Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Invoked to write an element when WS_CUSTOM_TYPE has been specified. This allows writing of XML constructs which do not easily map to the core serialization model.
Syntax
WS_WRITE_TYPE_CALLBACK WsWriteTypeCallback;
HRESULT WsWriteTypeCallback(
[in] WS_XML_WRITER *writer,
[in] WS_TYPE_MAPPING typeMapping,
[in] const void *descriptionData,
const void *value,
[in] ULONG valueSize,
[in, optional] WS_ERROR *error
)
{...}
Parameters
[in] writer
A WS_XML_WRITER pointer to the writer that the value should be written to.
[in] typeMapping
Indicates how the XML is being mapped to this type. See WS_TYPE_MAPPING for more information.
If a mapping does not make sense for this particular type, the callback should return WS_E_INVALID_OPERATION. (See Windows Web Services Return Values.) A callback implementation should be prepared to be passed new mapping types in future versions and should return WS_E_INVALID_OPERATION for those cases.
[in] descriptionData
This is the value of the descriptionData field of the WS_CUSTOM_TYPE_DESCRIPTION structure. The callback uses this field to access any additional information about the type.
value
A void pointer to a value to serialize.
[in] valueSize
The size, in bytes, of the value being serialized.
[in, optional] error
A pointer to a WS_ERROR data structure where additional error information should be stored if the function fails.
Return value
This callback function does not return a value.
Remarks
The callback will be invoked with the same calling sequence as WsWriteType in the documentation for WS_TYPE_MAPPING. This defines what parts of the XML that the callback should write.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | webservices.h |