Changes between Version 4 and Version 5 of Discovery/DiscoveryWebService


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Discovery/DiscoveryWebService

    v4 v5  
    202202[[Image(doPresentSchema.png)]] 
    203203 
    204 One 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 [#getListoperation getList] operation. All documents returned by a single invocation of the doPresent operation are returned in the same format. Currently-supported formats are: 
     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 [#getListoperation getList] operation. All documents returned by a single invocation of the doPresent operation are returned in the same format, i.e. the choice of presentFormat applies to the doPresent request and not individual documents. Currently-supported formats are: 
    205205 
    206206original  
     
    228228The <doPresentReturn> element contains the following top-level elements: 
    229229 
    230 <status>  
    231 true if there are any documents returned in the payload, false otherwise.  
    232 <statusMessage>  
    233 Textual information regarding success / failure / errors.  
    234 <documents>  
    235 If 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.  
    236 The <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.  
     230  <status>:: 
     231    true if there are any documents returned in the payload, false otherwise.  
     232  <statusMessage>:: 
     233    Textual information regarding success / failure / errors.  
     234  <documents>:: 
     235    If 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. 
     236 
     237The <document> element, if present and populated, contains the retrieved document as an encapsulated string representation of the XML. Depending 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 "&lt;". Most XML parsers should successfully parse the string to reconstruct the XML document, but it is returned in this form to avoid namespace issues.  
    237238 
    238239The following request / response sequence shows a successful doPresent operation: 
    239240 
    240241Request: 
    241  
    242 <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> 
     242{{{ 
     243<m:doPresent xmlns:m="urn:DiscoveryServiceAPI"> 
     244    <m:documents> 
     245        <m:document>badc.nerc.ac.uk__DIF__dataent_claus.xml</m:document> 
     246        <m:document>ndg.noc.soton.ac.uk__DIF__NOCSDAT160.xml</m:document> 
     247        <m:document>ndg.noc.soton.ac.uk__DIF__NOCSDAT162.xml</m:document> 
     248        <m:document>ndg.noc.soton.ac.uk__DIF__NOCSDAT163.xml</m:document> 
     249    </m:documents> 
     250    <m:format>original</m:format> 
     251</m:doPresent> 
     252}}} 
     253 
    243254Response: 
    244  
    245 <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> 
     255{{{ 
     256<doPresentReturn xmlns="urn:DiscoveryServiceAPI"> 
     257    <status>true</status> 
     258    <statusMessage>Success</statusMessage> 
     259    <documents> 
     260        <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> 
     261        <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> 
     262    </documents> 
     263</doPresentReturn> 
     264}}} 
    246265 
    247266