SRU Messages

Version 1.1, 12th January 2004

These messages are the equivalents of the SRW examples. For more information about the differences between SRW and SRU, see the SRU page.

explain Operation

The first operation would normally be the Explain operation. A typical Explain request would be:

  http://srw.cheshire3.org:8080/l5r?version=1.1&operation=explain

The corresponding response from the server would be:

<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>
      &lt;explain id=&quot;org.o-r-g.srw-first&quot; 
                      authoritative=&quot;true&quot;&gt;
        &lt;serverInfo wsdl=&quot;http://srw.o-r-g.org/wsdlfile.txt&quot; 
                           protocol=&quot;SRU&quot; version=&quot;1.1&quot;&gt;
          &lt;host&gt;srw.cheshire3.org&lt;/host&gt;
          &lt;port&gt;8080&lt;/port&gt;
          &lt;database numRecs=&quot;100&quot; lastUpdate=&quot;2002-08-18 11:30:00&quot;&gt;
            /l5r
          &lt;/database&gt;
        &lt;/serverInfo&gt;
       ...
     </SRW:recordData>
  </SRW:record>
</SRW:explainResponse>

 

searchRetrieve Operation

Subsequent operations might be searchRetrieve operations. A typical searchRetrieve request might be:

http://srw.cheshire3.org:8080/l5r?operation=searchRetrieve&version=1.1&startRecord=1
&query=dc.author exact jones and dc.title >=sword&maximumRecords=10&recordSchema=mods

The searchRetreive response would be of the form:

<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>
        &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
        &lt;mods xmlns:xlink=&quot;http://www.w3.org/TR/xlink&quot; 
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
           xmlns=&quot;http://www.loc.gov/mods/&quot; 
           xsi:schemaLocation=&quot;http://www.loc.gov/standards/mods/mods.xsd&quot;&gt;
          &lt;titleInfo&gt;
            &lt;title&gt;Sound and fury : the making of the punditocracy /&lt;/title&gt;
          &lt;/titleInfo&gt;
          &lt;name type=&quot;personal&quot;&gt;
            &lt;namePart&gt;Alterman, Eric.&lt;/namePart&gt;
            &lt;role&gt;creator&lt;/role&gt;
          &lt;/name&gt;
          ...
      </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>
        &lt;diagnostic&gt;
&lt;code&gt;68&lt;/code&gt;
&lt;details&gt;Not authorised to send record&lt;/details&gt;
&lt;/diagnostic&gt; </SRW:recordData> <SRW:recordNumber>2</SRW:recordNumber> </SRW:record> <SRW:records> <SRW:diagnostics> <DIAG:diagnostic> <DIAG:code>59</DIAG:code> <DIAG:message>Result set created with valid partial results available</DIAG:message> </DIAG:diagnostic> </SRW:diagnostics> </SRW:searchRetrieveResponse>

 

scan Operation

The other operation that can occur is scan. SOAP examples:
http://srw.cheshire3.org:8080/l5r?operation=scan&version=1.1&scanClause=dc.author any jones
&maximumTerms=20&responsePosition=1

And the response:

<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>