Retrieving data from Service Manager

Retrieval methods are not defined in the extaccess record. The following list shows the methods for retrieval that are available and under which circumstances to use each one:

Retrieve<FileName> — Used if only one record will be returned. Throws a fault if multiple records are returned.

Retrieve<FileName>KeysList — Retrieves the list of unique keys (which does not have to be the unique key of the Service Manager dbdicts). The list can either be passed as an array to the Retrieve<FileName>List method, or looped through to pass to the Retrieve<FileName> method.

Retrieve<FileName>List — Retrieves a list of records with information that was gathered either in the Retrieve<FileName>KeysList method or by passing in a query directly through the instance block. This method expects an array of keys unless the query approach is used.

Note When retrieving data from a single table rather than a Service such as the contacts table, request the WSDL for the alias name defined in extaccess, such as "Contact" (singular form, upper-case “C”) rather than for contacts (the actual file name).

There are different approaches to retrieving a list of records. When developing a custom client there are actually two separate methods that can be used to retrieve list data.

The first approach uses the following steps:

  1. Send the data query (such as <open.time>&gt;6/30/05</open.time>) to the RetrieveKeysList method.
  2. The result is a list of records where each record contains only the “primary key” (such as Incident ID) for those records that match the query.
  3. You can either provide the list to the RetrieveList method and receive all records defined by the list in a single XML document, or loop through the list, one record at a time, calling Retrieve once for each record by key.

The second approach uses these steps:

  1. Send the data query (such as <open.time>&gt;6/30/05</open.time>) directly to the RetrieveList method. Place the query in the “<instance>” block instead of the “<keys>” block.
  2. This single method call returns the entire result set (all fields for all records matching the query) in a single XML response.

Note The second approach returns the entire query result set in one method call. If the result set is large, use the first approach to increase performance.