WsReadMetadata function (webservices.h)
Reads a Metadata element and adds it to the Metadata documents of the Metadata object.
The Metadata object state must be set to WS_METADATA_STATE_CREATED.
On error the Metadata object state is reset to WS_METADATA_STATE_FAULTED.
Syntax
HRESULT WsReadMetadata(
[in] WS_METADATA *metadata,
[in] WS_XML_READER *reader,
[in] const WS_STRING *url,
[in, optional] WS_ERROR *error
);
Parameters
[in] metadata
A pointer to the Metadata object for storing the metadata read. The pointer must reference a valid WS_METADATA object.
[in] reader
A pointer to the XML Reader object used to read the metadata. The pointer must reference a valid WS_XML_READER object and the reader must be positioned on the element containing the desired metadata.
[in] url
A pointer to a WS_STRING object referencing the retrieved metadata URL. The URL is used to track the metadata documents for resolving URL-based links between documents.
The following URL schemes are supported:
- WS_URL_HTTP_SCHEME_TYPE
- WS_URL_HTTPS_SCHEME_TYPE
- WS_URL_NETTCP_SCHEME_TYPE
For example if the following URLs were specified:
http://example.com/document1#fragment
http://example.com/document2
The two base URLs would be:
http://example.com/document1
http://example.com/document2
[in, optional] error
A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
The input data was not in the expected format or did not have the expected value. |
|
The operation is not allowed due to the current state of the object. |
|
A quota was exceeded. |
|
Ran out of memory. |
|
One or more arguments are invalid. |
|
The element was not consumed. |
|
This function may return other errors not listed above. |
Remarks
This function recognizes the following types of metadata:
- WSDL 1.1 documents
- WS-Policy 1.2 documents
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | webservices.h |
Library | WebServices.lib |
DLL | WebServices.dll |