Retrieving content using Query
You can retrieve the content of a document using an XPATH Query.
Verb | GET |
URL | Content?query=<XPATH Query>&errorOnMultiple=false/true |
Body | N/A |
RC 404 | Object not found |
RC 401 | Not authorized to perform the action |
RC 401 (WSRR v8.0 URL) | Insufficient credentials to access WSRR |
RC 403 (WSRR v8.0 URL) | Not authorized to perform the action |
RC 500 | An error has occurred. See the error message for information. |
Any XPATH expression can be used.
If the errorOnMultiple=true flag is set, and the query finds more than one result, an error is returned.
If the errorOnMultiple=false flag is set or the errorOnMultiple flag is not
set in the URL and multiple results are found, the first one in the
list is returned.
Note: While it is likely that the same document
is returned, it is not guaranteed. When using this technique ensure
that only one result is returned from the query.
Example
To retrieve the content of a WSDL document with an error message if more than one result is returned, use a URL of the following form:
http[s]://hostname:port/WSRR/8.5/Content?query=/WSRR/WSDLDocument[@name='test.wsdl']&errorOnMultiple=true