Retrieving content as a compressed file
To retrieve the content and dependent content from the registry in the form of an archive or compressed file, perform a GET based on the bsrURI. The bsrURI can be the bsrURI of the service version, in which case, the API will retrieve WSDL and XSDs for the service.
When you register a service, you upload service definition documents (WSDL and XSD files) to WSRR and attach them to the service. When you use the service, you must download the service definition documents, and the WSDL and XSD files that those documents have imported. To download all of the files that the WSDL attached to the service requires, download the content as a compressed file with the extension .zip.
Verb | GET URL |
URL | Content/<bsrURI>?type=zip |
Body | N/A |
RC 404 | Object not found |
RC 401 | Not authorized to perform the action |
RC 401 (WSRR v8.5 and later URL) | Insufficient credentials to access WSRR |
RC 403 (WSRR v8.5 and later URL) | Not authorized to perform the action |
RC 500 | An error has occurred. See the error message for information. |
Download Service Definition Documentsoption from the Action menu in the Detail widget, or use the API to download as archive, providing the bsrURI of the AccountCreationDev.wsdl file. The AccountCreationDev.wsdl file imports AccountCreationInterface.wsdl, and in turn AccountCreationInterface.wsdl imports the schema AccountCreationSchema.xsd. If the download is started from the AccountCreationDev.wsdl file, then AccountCreationDev.wsdl is added to the archive file. The
Imports WSDLrelationship from AccountCreationDev.wsdl is followed; AccountCreationInterface.wsdl is found and added to the archive file. Then the
Imports schemarelationship from AccountCreationInterface.wsdl is followed and AccountCreationSchema.xsd is found and added to the archive file. If AccountCreationDev.wsdl also imported AccountCreationSchema.xsd, then AccountCreationSchema.xsd is added to the archive file only once.
If the bsrURI is that
of a Capability Version, the named queries ArtifactsFromServiceVersion
and ProvidedWebServicesFromServiceVersion
are
run. Any XSD or WSDL documents returned by these queries are used
to create the content of the compressed file, with the documents on
which they depend. In the Governance Enablement Profile, the previously
mentioned queries retrieve documents from the Documentation relationship and the Provided
Web Services relationship on the Capability Version.
If the
bsrURI is that of a SOAP Service Endpoint, the named query SourceDocumentFromSOAPServiceEndpoint
is
run. In the Governance Enablement Profile, the source WSDL document
for the SOAP Service Endpoint is used to create the content of the
compressed file, with the documents on which it depends.
Compressed file format
All content is stored in the root folder or directory of the compressed file. Any document imports are rewritten to refer to documents in the same directory. Document names must be unique; if more than one document has the same name, then an error is returned.
Using query
It is possible to retrieve content in the form of a compressed file by using the Query mechanism detailed in Retrieving content using Query. Add the following information to the URL that you enter: Content?type=zip&query=<XPATH Query>&errorOnMultiple=false, where the errorOnMultiple parameter can be set to false or true.
Retrieving all attached documents
When you perform a GET to retrieve content, you can add &allDocuments=true to the end of the URL to additionally retrieve all attached documents. The resulting compressed (.zip) file will include any XML documents, policy documents, or binary documents that are attached to the service.
Example
http[s]://hostname:port/WSRR/8.5/Content/bsruri?type=zip
where bsruri
is the bsrURI of the WSDL document whose content and dependencies
you want to retrieve. If you have multiple instances of WSRR deployed, you must identify the instance by specifying its prefix, for example: http://hostname:port/prefixWSRR/8.5/Content/bsruri?type=zip, where prefix is the WSRR Instance Prefix that you specified when you created the instance.