Changes between Version 2 and Version 3 of Discovery/DiscoveryWebService


Ignore:
Timestamp:
20/07/09 14:43:03 (10 years ago)
Author:
mpritcha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Discovery/DiscoveryWebService

    v2 v3  
    2929== XML Data Types == 
    3030 
    31 The XML documents used as request and response documents for each of the service operations (methods) is defined in the <xsd:schema> section of the WSDL document. The structure of each of these documents is discussed as part of the [#DiscoveryServiceMethods operation/method descriptions] below. 
     31The XML documents used as request and response documents for each of the service operations (methods) are defined in the <xsd:schema> section of the WSDL document. The structure of each of these documents is discussed as part of the [#DiscoveryServiceMethods operation/method descriptions] below. 
    3232 
    3333== Discovery Service Operations == 
     
    196196}}} 
    197197 
     198=== doPresent operation === 
     199 
     200The doPresent operation provides a means of retrieving (presenting) one or more XML documents from the database. The doPresentRequest message is defined as follows: 
     201 
     202[[Image(doPresentSchema.png)]] 
     203 
     204One or more <document> elements should each contain the names of a document (in the form returned in the doSearchReturn message) to be retrieved. The optional <format> element should be populated with one of the supported format names as listed by the presentFormatList accessible via the [#getList getList] operation. All documents are returned in the same format from a given doPresent request. Currently-supported formats are: 
     205 
     206original  
     207Documents are returned unaltered, in the format in which they were harvested (via OAI) from the data provider  
     208DC  
     209Dublin Core format  
     210DIF  
     211GCMD DIF format  
     212MDIP  
     213Metadata format used by the Marine Data and Information Partnership  
     214ISO19115  
     215ISO19115 (Geographic Information: Metadata) encoded as ISO19139 XML  
     216For all formats except original, the following action is taken prior to returning the document: 
     217 
     218Check if the document exists in the discovery database in the requested format, and if so, return it unaltered  
     219Apply a conversion XQuery to create a new document in that format on-the-fly  
     220doPresent response 
     221The doPresentResponse message is defined in the WSDL as follows: 
     222 
     223  
     224 
     225The <doPresentReturn> element contains the following top-level elements: 
     226 
     227<status>  
     228true if there are any documents returned in the payload, false otherwise.  
     229<statusMessage>  
     230Textual information regarding success / failure / errors.  
     231<documents>  
     232If some documents have been successfully returned, a <documents> element is present and will contain a child <document> element for each document retrieved. In the case where some but not all documents are successfully returned, the <documents> element will contain populated <document> elements for the successfully-retrieved documents, but an empty <document> element for those where retrieval failed. If NO documents are successfully returned, however, then the <status> is set to false and no <documents> element is included in the doPresentResponse message.  
     233The <document> element, if present and populated, contains the retrieved document as an encapsulated string representation of the XMLDepending on the client used to display the payload document, it either appears contained within a <![CDATA[ ... ]]> construct, or as XML with the opening angle brackets "<" escaped as "<". Most XML parsers should successfully parse the string to reconstruct the XML document, but it is returned in this form to avoid namespace issues.  
     234 
     235The following request / response sequence shows a successful doPresent operation: 
     236 
     237Request: 
     238 
     239<m:doPresent xmlns:m="urn:DiscoveryServiceAPI"> <m:documents>           <m:document>badc.nerc.ac.uk__DIF__dataent_claus.xml</m:document>                <m:document>ndg.noc.soton.ac.uk__DIF__NOCSDAT160.xml</m:document>               <m:document>ndg.noc.soton.ac.uk__DIF__NOCSDAT162.xml</m:document>               <m:document>ndg.noc.soton.ac.uk__DIF__NOCSDAT163.xml</m:document>       </m:documents>  <m:format>original</m:format></m:doPresent> 
     240Response: 
     241 
     242<doPresentReturn xmlns="urn:DiscoveryServiceAPI">       <status>true</status>   <statusMessage>Success</statusMessage>  <documents>             <document>&lt;DIF xmlns="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&lt;Entry_ID>badc.nerc.ac.uk:DIF:dataent_claus&lt;/Entry_ID> (...) &lt;/DIF></document>              <document>&lt;DIF xmlns="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&lt;Entry_ID>ndg.noc.soton.ac.uk__DIF__NOCSDAT160&lt;/Entry_ID> (...) &lt;/DIF></document>           <document>&<DIF xmlns="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&lt;Entry_ID>ndg.noc.soton.ac.uk__DIF__NOCSDAT162&lt;/Entry_ID> (...) &lt;/DIF></document>             <document>&lt;DIF xmlns="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&lt;Entry_ID>ndg.noc.soton.ac.uk__DIF__NOCSDAT163&lt;/EntryID> (...) &lt;/DIF></document>    </documents></doPresentReturn> 
     243 
     244 
    198245== Term Lists == 
    199246