8.4 SearchRetrieve Web Service SRWSRU implementation notes
SRW is the “SearchRetrieve Web Service” variant of Z39.50 that implements a simplified, stateless approach to catalogue services that preserves core functions of the
Information retrieval protocol but offers them over HTTP. SRW provides Simple Object Access Protocol SOAP access to post and receive messages as formatted XML; SRU is
a URL-based access method that employs keyword-value pairs KVP using GET interfaces. SRU supports a simplified predicate language that can be mapped to the OGC
Common Query Language. SRW permits the use of the KVP query or Xpath expressions for search over SOAP.
SRW defines a web service combining several Z39.50 features, most notably, the Search, Present, and Sort Services. Additional featuresservices may be added later or defined
later as new web services. The Z39.50 concepts retained in SRW include result sets, abstract access points, abstract record schemas, explain, and diagnostics. SRW features
which differ from Z39.50 include the result set is named by the server rather than the client, lack of connections or sessions, and the fact that a serviceserver is synonymous
with a database or target services infer a single database. All SRW records are retrieved according to a single record syntax XML and therefore the Z39.50 concept of record
syntax is not meaningful in SRW. The Z39.50 concepts of element setspecification and schema are represented by XML schemas. Explain information identifies supported
access points and record schemas. Finally, XML is used in place of ASN.1 and BER.
Table 48 represents the request arguments for simplified search using SRW.
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
83
Table 48 — SearchRetrieve request parameters
Name Type Obligation
Description
query xsi:string
Only one of xQuery or query
shall be present Contains a query expressed in CQL to be processed by
the server. This parameter may only be present if xQuery is not present.
xQuery srw:xcqlType
Only one of xQuery or query
shall be present Contains a query expressed in XCQL to be processed
by the server. This parameter may only be present if query is not present. This parameter is not valid for
SRU. sortKeys
xsi:string Optional
Contains a sequence of sort keys to be applied to the results, if any. The keys are expressed in the simple
string format for sort in SRW. xSortKeys
srw:xsortType Optional Contains a sequence of sort keys to be applied to the
results, if any. The keys are expressed in the XML format for sort in SRW. This parameter is not valid
for SRU. startRecord
xsi:integer Optional
The position within the sequence of matched records of the first record to be returned. The first position in
the sequence is 1. The value supplied shall be greater than 0. Default value if not supplied is 1.
maximumRecords xsi:integer Optional
The number of records requested to be returned. The value shall be 0 or greater. Default value if not
supplied is determined by the server. recordSchema
xsi:string Optional
The schema in which any records should be returned. The value is the URI identifier for the schema. The
default value if not supplied is determined by the server.
Table 49 — SearchRetrieve response parameters
Name Type Obligation
Description
numberOfRecords xsi:integer
Mandatory The number of records matched by the query. If the query
fails this will be 0. resultSetId
xsi:string Optional
The identifier for a result set that was created through the execution of the query.
resultSetIdleTime xsi:integer
Optional The number of seconds in which the created result set will
be destroyed. The result set may be destroyed before this by the server.
records array of
records Optional
A sequence of records matched by the query, or surrogate diagnostics.
diagnostics array of
diagnostics Optional
A sequence of non surrogate diagnostics generated during execution.
nextRecordPosition xsi:integer Optional
The next position within the result set after the final record returned. If there are no remaining records, this value will
be 0. echoedRequest
xsi:string Optional
The request parameters echoed back to the client in a simple XML form.
84
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
The Explain functionality is further described in the SRW document.
9 CORBAIIOP protocol binding
9.1 Architecture