Version 1.1, 12th January 2004
The first SRW Operation would normally be the Explain operation. A typical Explain request would be:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SRW:explainRequest xmlns:SRW="http://www.loc.gov/zing/srw/">
<SRW:version>1.1</SRW:version>
</SRW:explainRequest>
</SOAP:Body>
</SOAP:Envelope>
|
The corresponding response from the server would be:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SRW:explainResponse xmlns:SRW="http://www.loc.gov/zing/srw/">
<SRW:version>1.1</SRW:version>
<SRW:record>
<SRW:recordSchema>http://explain.z3950.org/dtd/2.0/</SRW:recordSchema>
<SRW:recordPacking>string</SRW:recordPacking>
<SRW:recordData>
<explain id="org.o-r-g.srw-first"
authoritative="true">
<serverInfo wsdl="http://srw.o-r-g.org/wsdlfile.txt"
protocol="srw" version="1.1">
<host>srw.o-r-g.org</host>
<port>8080</port>
<database numRecs="100" lastUpdate="2002-08-18 11:30:00">
/l5r
</database>
</serverInfo>
...
</SRW:recordData>
</SRW:record>
</SRW:explainResponse>
</SOAP:Body>
</SOAP:Envelope>
|
Subsequent operations might be searchRetrieve operations. A typical searchRetrieve request might be:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SRW:searchRetrieveRequest xmlns:SRW="http://www.loc.gov/zing/srw/">
<SRW:version>1.1</SRW:version>
<SRW:query>(dc.author exact "jones" and dc.title >= "smith")</SRW:query>
<SRW:startRecord>1</SRW:startRecord>
<SRW:maximumRecords>10</SRW:maximumRecords>
<SRW:recordSchema>http://www.loc.gov/mods/</SRW:recordsSchema>
</SRW:searchRetreiveRequest>
</SOAP:Body>
</SOAP:Envelope>
|
The searchRetreive response would be of the form:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SRW:searchRetrieveResponse xmlns:SRW="http://www.loc.gov/zing/srw/"
xmlns:DIAG="http://www.loc.gov/zing/srw/diagnostics/">
<SRW:version>1.1</SRW:version>
<SRW:numberOfRecords>2</SRW:numberOfRecords>
<SRW:resultSetId>8c527d60-c3b4-4cec-a1de-1ff80a5932df</SRW:resultSetId>
<SRW:resultSetIdleTime>600</SRW:resultSetIdleTime>
<SRW:records>
<SRW:record>
<SRW:recordSchema>http://www.loc.gov/mods/</SRW:recordSchema>
<SRW:recordPacking>string</SRW:recordPacking>
<SRW:recordData>
<?xml version="1.0" encoding="UTF-8"?>
<mods xmlns:xlink="http://www.w3.org/TR/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.loc.gov/mods/"
xsi:schemaLocation="http://www.loc.gov/standards/mods/mods.xsd">
<titleInfo>
<title>Sound and fury : the making of the punditocracy /</title>
</titleInfo>
<name type="personal">
<namePart>Alterman, Eric.</namePart>
<role>creator</role>
</name>
...
</SRW:recordData>
<SRW:recordNumber>1</SRW:recordNumber>
</SRW:record>
<SRW:record>
<SRW:recordSchema>http://www.loc.gov/zing/srw/diagnostics/</SRW:recordSchema>
<SRW:recordPacking>string</SRW:recordPacking>
<SRW:recordData>
<diagnostic>
|
The other operation that can occur is scan. SOAP examples:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SRW:scanRequest xmlns:SRW="http://www.loc.gov/zing/srw/">
<SRW:version>1.1</SRW:version>
<SRW:scanClause>dc.author any "jones"</SRW:scanClause>
<SRW:maximumTerms>20</SRW:maximumTerms>
<SRW:responsePosition>1</SRW:responsePosition>
</SRW:scanRequest>
</SOAP:Body>
</SOAP:Envelope>
|
And the response:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SRW:scanResponse xmlns:SRW="http://www.loc.gov/zing/srw/">
<SRW:version>1.1</SRW:version>
<SRW:terms>
<SRW:term>
<SRW:value>jones</SRW:value>
<SRW:numberOfRecords>234</SRW:numberOfRecords>
<SRW:/term>
<SRW:term>
<SRW:value>jonty</SRW:value>
<SRW:numberOfRecords>56</SRW:numberOfRecords>
<SRW:/term>
...
</SRW:terms>
</SRW:scanResponse>
</SOAP:Body>
</SOAP:Envelope>
|