Newer Version Available

This content describes an older version of this product. View Latest

checkRetrieveStatus()

Checks the status of declarative metadata call retrieve() and returns the zip file contents.

Syntax

1RetrieveResult = metadatabinding.checkRetrieveStatus(ID id);

Usage

Use checkRetrieveStatus() to check the progress of the metadata retrieve() operation. The RetrieveResult object that this method returns indicates when the asynchronous retrieve() call is completed. If the retrieval is completed, RetrieveResult contains the zip file contents. Use the following process to retrieve metadata components with the retrieve() call.

  1. Issue a retrieve() call to start the asynchronous retrieval. An AsyncResult object is returned. Note the value in the id field and use it for the next step.
  2. Issue a checkRetrieveStatus() call and pass in the id value from the AsyncResult object from the first step. Check the value of the done field of the returned RetrieveResult. If it is true, this means that the call is completed and proceed to the next step. Otherwise, repeat this step to call checkRetrieveStatus() again until the done field is true.
  3. Retrieve the zip file (zipFile field) and other desired fields from RetrieveResult that was returned by the final call to checkRetrieveStatus() in the previous step.

In API version 31.0 and later, the process of making a retrieve() call has been simplified. You no longer have to call checkStatus() after a retrieve() call to obtain the status of the retrieve operation. Instead, make calls to checkRetrieveStatus() only. If the retrieve operation is in progress, call checkRetrieveStatus() again until the retrieve operation is completed. The checkStatus() call is still supported in versions API version 30.0 or earlier, but is not available in API version 31.0 and later.

Sample Code—Java

See the retrieve() sample code for sample usage of this call.

Arguments

Name Type Description
id ID ID obtained from a RetrieveResult object returned by a retrieve() call or a subsequent AsyncResult object returned by a checkStatus() call.

Response

RetrieveResult