Skip to content

Instantly share code, notes, and snippets.

@atz
Last active September 29, 2017 19:01
Show Gist options
  • Save atz/ad2f8eef328e4ea59c2ec7abc25489ab to your computer and use it in GitHub Desktop.
Save atz/ad2f8eef328e4ea59c2ec7abc25489ab to your computer and use it in GitHub Desktop.
WoS request failing (400 error)
curl -v -H "Content-Type: text/xml;charset=UTF-8" -H 'Cookie: SID="3AXgqFUsHT3lTpcgEhQ"' -d @wtf.xml "http://search.webofknowledge.com/esti/wokmws/ws/WokSearch"
* Trying 167.68.24.86...
* TCP_NODELAY set
* Connected to search.webofknowledge.com (167.68.24.86) port 80 (#0)
> POST /esti/wokmws/ws/WokSearch HTTP/1.1
> Host: search.webofknowledge.com
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: text/xml;charset=UTF-8
> Cookie: SID="3AXgqFUsHT3lTpcgEhD"
> Content-Length: 724
>
* upload completely sent off: 724 out of 724 bytes
< HTTP/1.1 500 Internal Server Error
< Server: Apache-Coyote/1.1
< Content-Type: text/xml;charset=UTF-8
< Content-Length: 333
< Date: Thu, 28 Sep 2017 21:42:33 GMT
< X-Cnection: close
<
* Curl_http_done: called premature == 0
* Connection #0 to host search.webofknowledge.com left intact
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'queryLanguage'. One of '{uid}' is expected. </faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
curl -v -H "Content-Type: text/xml;charset=UTF-8" -H 'Cookie: SID="3AXgqFUsHT3lTpcgEhQ"' -d @wtf.xml "http://search.webofknowledge.com/esti/wokmws/ws/WokSearch"
* Trying 167.68.24.86...
* TCP_NODELAY set
* Connected to search.webofknowledge.com (167.68.24.86) port 80 (#0)
> POST /esti/wokmws/ws/WokSearch HTTP/1.1
> Host: search.webofknowledge.com
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: text/xml;charset=UTF-8
> Cookie: SID="3AXgqFUsHT3lTpcgEhD"
> Content-Length: 724
>
* upload completely sent off: 724 out of 724 bytes
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Type: text/xml;charset=UTF-8
< Content-Length: 7901
< Date: Thu, 28 Sep 2017 21:49:40 GMT
<
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:retrieveByIdResponse xmlns:ns2="http://woksearch.v3.wokmws.thomsonreuters.com"><return><queryId>1</queryId><recordsFound>2</recordsFound><recordsSearched>66862645</recordsSearched><optionValue><label>RecordIDs</label><value>WOS:A1976BW18000001</value><value>WOS:A1982PA35300010</value></optionValue><records>&lt;records xmlns="http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord">
&lt;REC r_id_disclaimer="ResearcherID data provided by Clarivate Analytics">&lt;UID>WOS:A1976BW18000001&lt;/UID>&lt;static_data>&lt;summary>&lt;EWUID>&lt;WUID coll_id="WOS">&lt;/WUID>&lt;edition value="WOS.SSCI">&lt;/edition>&lt;edition value="WOS.SCI">&lt;/edition>&lt;/EWUID>&lt;pub_info coverdate="1976" has_abstract="N" issue="3" pubtype="Journal" pubyear="1976" sortdate="1976-01-01" vol="37">&lt;page begin="205" end="221" page_count="17">205-221&lt;/page>&lt;/pub_info>&lt;titles count="6">&lt;title type="source">COLLEGE &amp;amp; RESEARCH LIBRARIES&lt;/title>&lt;title type="source_abbrev">COLL RES LIBR&lt;/title>&lt;title type="abbrev_iso">Coll. Res. Libr.&lt;/title>&lt;title type="abbrev_11">COLL RES LI&lt;/title>&lt;title type="abbrev_29">COLL RES LIBR&lt;/title>&lt;title type="item">CENTURY OF COOPERATIVE PROGRAMS AMONG ACADEMIC-LIBRARIES&lt;/title>&lt;/titles>&lt;names count="1">&lt;name daisng_id="19670132" seq_no="1" role="author">&lt;display_name>WEBER, DC&lt;/display_name>&lt;full_name>WEBER, DC&lt;/full_name>&lt;wos_standard>WEBER, DC&lt;/wos_standard>&lt;first_name>DC&lt;/first_name>&lt;last_name>WEBER&lt;/last_name>&lt;/name>&lt;/names>&lt;doctypes count="1">&lt;doctype>Article&lt;/doctype>&lt;/doctypes>&lt;publishers>&lt;publisher>&lt;address_spec addr_no="1">&lt;full_address>50 E HURON ST, CHICAGO, IL 60611&lt;/full_address>&lt;city>CHICAGO&lt;/city>&lt;/address_spec>&lt;names count="1">&lt;name addr_no="1" role="publisher" seq_no="1">&lt;display_name>ASSOC COLL RESEARCH LIBRARIES&lt;/display_name>&lt;full_name>ASSOC COLL RESEARCH LIBRARIES&lt;/full_name>&lt;/name>&lt;/names>&lt;/publisher>&lt;/publishers>&lt;/summary>&lt;fullrecord_metadata>&lt;languages count="1">&lt;language type="primary">English&lt;/language>&lt;/languages>&lt;normalized_languages count="1">&lt;language type="primary">English&lt;/language>&lt;/normalized_languages>&lt;normalized_doctypes count="1">&lt;doctype>Article&lt;/doctype>&lt;/normalized_doctypes>&lt;refs count="41">&lt;/refs>&lt;addresses count="1">&lt;address_name>&lt;address_spec addr_no="1">&lt;full_address>STANFORD UNIV LIB,STANFORD,CA 94305&lt;/full_address>&lt;organizations count="2">&lt;organization>STANFORD UNIV LIB&lt;/organization>&lt;organization pref="Y">Stanford University&lt;/organization>&lt;/organizations>&lt;city>STANFORD&lt;/city>&lt;state>CA&lt;/state>&lt;country>USA&lt;/country>&lt;zip location="AP">94305&lt;/zip>&lt;/address_spec>&lt;/address_name>&lt;/addresses>&lt;category_info>&lt;headings count="1">&lt;heading>Science &amp;amp; Technology&lt;/heading>&lt;/headings>&lt;subheadings count="1">&lt;subheading>Technology&lt;/subheading>&lt;/subheadings>&lt;subjects count="3">&lt;subject ascatype="traditional" code="NU">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="extended">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="traditional" code="NU">INFORMATION SCIENCE &amp;amp; LIBRARY SCIENCE&lt;/subject>&lt;/subjects>&lt;/category_info>&lt;/fullrecord_metadata>&lt;item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" coll_id="WOS" xsi:type="itemType_wos">&lt;ids avail="Y">BW180&lt;/ids>&lt;bib_id>37 (3): 205-221 1976&lt;/bib_id>&lt;/item>&lt;/static_data>&lt;dynamic_data>&lt;citation_related>&lt;tc_list>&lt;silo_tc coll_id="WOS" local_count="12">&lt;/silo_tc>&lt;/tc_list>&lt;/citation_related>&lt;cluster_related>&lt;identifiers>&lt;identifier type="issn" value="0010-0870">&lt;/identifier>&lt;/identifiers>&lt;/cluster_related>&lt;/dynamic_data>&lt;/REC>
&lt;REC r_id_disclaimer="ResearcherID data provided by Clarivate Analytics">&lt;UID>WOS:A1982PA35300010&lt;/UID>&lt;static_data>&lt;summary>&lt;EWUID>&lt;WUID coll_id="WOS">&lt;/WUID>&lt;edition value="WOS.SSCI">&lt;/edition>&lt;/EWUID>&lt;pub_info issue="4" pubtype="Journal" sortdate="1982-01-01" has_abstract="N" coverdate="1982" vol="43" pubyear="1982">&lt;page end="357" page_count="2" begin="356">356-357&lt;/page>&lt;/pub_info>&lt;titles count="6">&lt;title type="source">COLLEGE &amp;amp; RESEARCH LIBRARIES&lt;/title>&lt;title type="source_abbrev">COLL RES LIBR&lt;/title>&lt;title type="abbrev_iso">Coll. Res. Libr.&lt;/title>&lt;title type="abbrev_11">COLL RES LI&lt;/title>&lt;title type="abbrev_29">COLL RES LIBR&lt;/title>&lt;title type="item">UNIVERSITY LIBRARIANSHIP - STIRLING,JF&lt;/title>&lt;/titles>&lt;names count="1">&lt;name daisng_id="19669762" seq_no="1" role="author" reprint="Y">&lt;display_name>WEBER, DC&lt;/display_name>&lt;full_name>WEBER, DC&lt;/full_name>&lt;wos_standard>WEBER, DC&lt;/wos_standard>&lt;first_name>DC&lt;/first_name>&lt;last_name>WEBER&lt;/last_name>&lt;/name>&lt;/names>&lt;doctypes count="1">&lt;doctype>Book Review&lt;/doctype>&lt;/doctypes>&lt;publishers>&lt;publisher>&lt;address_spec addr_no="1">&lt;full_address>50 E HURON ST, CHICAGO, IL 60611&lt;/full_address>&lt;city>CHICAGO&lt;/city>&lt;/address_spec>&lt;names count="1">&lt;name addr_no="1" role="publisher" seq_no="1">&lt;display_name>ASSOC COLL RESEARCH LIBRARIES&lt;/display_name>&lt;full_name>ASSOC COLL RESEARCH LIBRARIES&lt;/full_name>&lt;/name>&lt;/names>&lt;/publisher>&lt;/publishers>&lt;/summary>&lt;fullrecord_metadata>&lt;languages count="1">&lt;language type="primary">English&lt;/language>&lt;/languages>&lt;normalized_languages count="1">&lt;language type="primary">English&lt;/language>&lt;/normalized_languages>&lt;normalized_doctypes count="1">&lt;doctype>Review&lt;/doctype>&lt;/normalized_doctypes>&lt;refs count="1">&lt;/refs>&lt;addresses count="0">&lt;/addresses>&lt;category_info>&lt;headings count="1">&lt;heading>Science &amp;amp; Technology&lt;/heading>&lt;/headings>&lt;subheadings count="1">&lt;subheading>Technology&lt;/subheading>&lt;/subheadings>&lt;subjects count="3">&lt;subject ascatype="traditional" code="NU">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="extended">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="traditional" code="NU">INFORMATION SCIENCE &amp;amp; LIBRARY SCIENCE&lt;/subject>&lt;/subjects>&lt;/category_info>&lt;/fullrecord_metadata>&lt;item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="itemType_wos">&lt;ids avail="Y">PA353&lt;/ids>&lt;bib_id>43 (4): 356-357 1982&lt;/bib_id>&lt;reprint_contact>&lt;address_spec addr_no="1">&lt;full_address>STANFORD UNIV,STANFORD,CA 94305, USA&lt;/full_address>&lt;organizations count="2">&lt;organization>STANFORD UNIV&lt;/organization>&lt;organization pref="Y">Stanford University&lt;/organization>&lt;/organizations>&lt;city>STANFORD&lt;/city>&lt;state>CA&lt;/state>&lt;country>USA&lt;/country>&lt;zip location="AP">94305&lt;/zip>&lt;/address_spec>&lt;names count="1">&lt;name addr_no="1" role="author" seq_no="1" reprint="Y">&lt;display_name>WEBER, DC&lt;/display_name>&lt;full_name>WEBER, DC&lt;/full_name>&lt;wos_standard>WEBER, DC&lt;/wos_standard>&lt;first_name>DC&lt;/first_name>&lt;last_name>WEBER&lt;/last_name>&lt;/name>&lt;/names>&lt;/reprint_contact>&lt;/item>&lt;/static_data>&lt;dynamic_data>&lt;citation_related>&lt;tc_list>&lt;silo_tc coll_id="WOS" local_count="0">&lt;/silo_tc>&lt;/tc_list>&lt;/citation_related>&lt;cluster_related>&lt;identifiers>&lt;identifier value="0010-0870" type="issn">&lt;/identifier>&lt;/identifiers>&lt;/cluster_related>&lt;/dynamic_data>&lt;/REC>
&lt;/records></records></return></ns2:retrieveByIdResponse></soap:Body></soap:Envelope>
* Curl_http_done: called premature == 0
* Connection #0 to host search.webofknowledge.com left intact
I, [2017-09-28T14:51:18.203863 #27935] INFO -- : post http://search.webofknowledge.com/esti/wokmws/ws/WokSearch
D, [2017-09-28T13:51:18.318937 #27935] DEBUG -- request: User-Agent: "Faraday v0.12.0.1"
Host: "http://search.webofknowledge.com"
Connection: "Keep-Alive"
Content-Type: "text/xml"
Cookie: "SID=\"3Fh5DqA2vEIQ7EoQdkT\""
D, [2017-09-28T13:51:18.318962 #27935] DEBUG -- request: <?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:woksearch="http://woksearch.v3.wokmws.thomsonreuters.com">
<soapenv:Header/>
<soapenv:Body>
<woksearch:retrieveById>
<databaseId>WOS</databaseId>
<queryLanguage>en</queryLanguage>
<uid>WOS:A1982PA35300010</uid>
<uid>WOS:A1976BW18000001</uid>
<retrieveParameters>
<firstRecord>1</firstRecord>
<count>2</count>
<option>
<key>RecordIDs</key>
<value>On</value>
</option>
<option>
<key>targetNamespace</key>
<value>http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord</value>
</option>
</retrieveParameters>
</woksearch:retrieveById>
</soapenv:Body>
</soapenv:Envelope>
@atz
Copy link
Author

atz commented Sep 28, 2017

Turns out the ORDER of XML body elements sent to their SOAP endpoint matters. Which is ugly as sin. Move queryLanguage down two lines and the same request succeeds. But looking at the output, we have major encoding problem where the content of <records> is STRING. That string happens to be the double-encoded version of XML for a different <records> element! This makes no sense at all. What is the problem putting XML child elements in XML?

@atz
Copy link
Author

atz commented Sep 28, 2017

Prettying up (part of) the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body><ns2:retrieveByIdResponse xmlns:ns2="http://woksearch.v3.wokmws.thomsonreuters.com">
    <return>
      <queryId>1</queryId>
      <recordsFound>2</recordsFound>
      <recordsSearched>66862645</recordsSearched>
      <optionValue>
        <label>RecordIDs</label>
        <value>WOS:A1976BW18000001</value>
        <value>WOS:A1982PA35300010</value>
      </optionValue>
      <records>&lt;records xmlns="http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord">
&lt;REC r_id_disclaimer="ResearcherID data provided by Clarivate Analytics">&lt;UID>WOS:A1976BW18000001&lt;/UID>&lt;static_data>&lt;summary>&lt;EWUID>&lt;WUID coll_id="WOS">&lt;/WUID>&lt;edition value="WOS.SSCI">&lt;/edition>&lt;edition value="WOS.SCI">&lt;/edition>&lt;/EWUID>&lt;pub_info coverdate="1976" has_abstract="N" issue="3" pubtype="Journal" pubyear="1976" sortdate="1976-01-01" vol="37">&lt;page begin="205" end="221" page_count="17">205-221&lt;/page>&lt;/pub_info>&lt;titles count="6">&lt;title type="source">COLLEGE &amp;amp; RESEARCH LIBRARIES&lt;/title>&lt;title type="source_abbrev">COLL RES LIBR&lt;/title>&lt;title type="abbrev_iso">Coll. Res. Libr.&lt;/title>&lt;title type="abbrev_11">COLL RES LI&lt;/title>&lt;title type="abbrev_29">COLL RES LIBR&lt;/title>&lt;title type="item">CENTURY OF COOPERATIVE PROGRAMS AMONG ACADEMIC-LIBRARIES&lt;/title>&lt;/titles>&lt;names count="1">&lt;name daisng_id="19670132" seq_no="1" role="author">&lt;display_name>WEBER, DC&lt;/display_name>&lt;full_name>WEBER, DC&lt;/full_name>&lt;wos_standard>WEBER, DC&lt;/wos_standard>&lt;first_name>DC&lt;/first_name>&lt;last_name>WEBER&lt;/last_name>&lt;/name>&lt;/names>&lt;doctypes count="1">&lt;doctype>Article&lt;/doctype>&lt;/doctypes>&lt;publishers>&lt;publisher>&lt;address_spec addr_no="1">&lt;full_address>50 E HURON ST, CHICAGO, IL 60611&lt;/full_address>&lt;city>CHICAGO&lt;/city>&lt;/address_spec>&lt;names count="1">&lt;name addr_no="1" role="publisher" seq_no="1">&lt;display_name>ASSOC COLL RESEARCH LIBRARIES&lt;/display_name>&lt;full_name>ASSOC COLL RESEARCH LIBRARIES&lt;/full_name>&lt;/name>&lt;/names>&lt;/publisher>&lt;/publishers>&lt;/summary>&lt;fullrecord_metadata>&lt;languages count="1">&lt;language type="primary">English&lt;/language>&lt;/languages>&lt;normalized_languages count="1">&lt;language type="primary">English&lt;/language>&lt;/normalized_languages>&lt;normalized_doctypes count="1">&lt;doctype>Article&lt;/doctype>&lt;/normalized_doctypes>&lt;refs count="41">&lt;/refs>&lt;addresses count="1">&lt;address_name>&lt;address_spec addr_no="1">&lt;full_address>STANFORD UNIV LIB,STANFORD,CA 94305&lt;/full_address>&lt;organizations count="2">&lt;organization>STANFORD UNIV LIB&lt;/organization>&lt;organization pref="Y">Stanford University&lt;/organization>&lt;/organizations>&lt;city>STANFORD&lt;/city>&lt;state>CA&lt;/state>&lt;country>USA&lt;/country>&lt;zip location="AP">94305&lt;/zip>&lt;/address_spec>&lt;/address_name>&lt;/addresses>&lt;category_info>&lt;headings count="1">&lt;heading>Science &amp;amp; Technology&lt;/heading>&lt;/headings>&lt;subheadings count="1">&lt;subheading>Technology&lt;/subheading>&lt;/subheadings>&lt;subjects count="3">&lt;subject ascatype="traditional" code="NU">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="extended">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="traditional" code="NU">INFORMATION SCIENCE &amp;amp; LIBRARY SCIENCE&lt;/subject>&lt;/subjects>&lt;/category_info>&lt;/fullrecord_metadata>&lt;item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" coll_id="WOS" xsi:type="itemType_wos">&lt;ids avail="Y">BW180&lt;/ids>&lt;bib_id>37 (3): 205-221 1976&lt;/bib_id>&lt;/item>&lt;/static_data>&lt;dynamic_data>&lt;citation_related>&lt;tc_list>&lt;silo_tc coll_id="WOS" local_count="12">&lt;/silo_tc>&lt;/tc_list>&lt;/citation_related>&lt;cluster_related>&lt;identifiers>&lt;identifier type="issn" value="0010-0870">&lt;/identifier>&lt;/identifiers>&lt;/cluster_related>&lt;/dynamic_data>&lt;/REC>
&lt;REC r_id_disclaimer="ResearcherID data provided by Clarivate Analytics">&lt;UID>WOS:A1982PA35300010&lt;/UID>&lt;static_data>&lt;summary>&lt;EWUID>&lt;WUID coll_id="WOS">&lt;/WUID>&lt;edition value="WOS.SSCI">&lt;/edition>&lt;/EWUID>&lt;pub_info issue="4" pubtype="Journal" sortdate="1982-01-01" has_abstract="N" coverdate="1982" vol="43" pubyear="1982">&lt;page end="357" page_count="2" begin="356">356-357&lt;/page>&lt;/pub_info>&lt;titles count="6">&lt;title type="source">COLLEGE &amp;amp; RESEARCH LIBRARIES&lt;/title>&lt;title type="source_abbrev">COLL RES LIBR&lt;/title>&lt;title type="abbrev_iso">Coll. Res. Libr.&lt;/title>&lt;title type="abbrev_11">COLL RES LI&lt;/title>&lt;title type="abbrev_29">COLL RES LIBR&lt;/title>&lt;title type="item">UNIVERSITY LIBRARIANSHIP - STIRLING,JF&lt;/title>&lt;/titles>&lt;names count="1">&lt;name daisng_id="19669762" seq_no="1" role="author" reprint="Y">&lt;display_name>WEBER, DC&lt;/display_name>&lt;full_name>WEBER, DC&lt;/full_name>&lt;wos_standard>WEBER, DC&lt;/wos_standard>&lt;first_name>DC&lt;/first_name>&lt;last_name>WEBER&lt;/last_name>&lt;/name>&lt;/names>&lt;doctypes count="1">&lt;doctype>Book Review&lt;/doctype>&lt;/doctypes>&lt;publishers>&lt;publisher>&lt;address_spec addr_no="1">&lt;full_address>50 E HURON ST, CHICAGO, IL 60611&lt;/full_address>&lt;city>CHICAGO&lt;/city>&lt;/address_spec>&lt;names count="1">&lt;name addr_no="1" role="publisher" seq_no="1">&lt;display_name>ASSOC COLL RESEARCH LIBRARIES&lt;/display_name>&lt;full_name>ASSOC COLL RESEARCH LIBRARIES&lt;/full_name>&lt;/name>&lt;/names>&lt;/publisher>&lt;/publishers>&lt;/summary>&lt;fullrecord_metadata>&lt;languages count="1">&lt;language type="primary">English&lt;/language>&lt;/languages>&lt;normalized_languages count="1">&lt;language type="primary">English&lt;/language>&lt;/normalized_languages>&lt;normalized_doctypes count="1">&lt;doctype>Review&lt;/doctype>&lt;/normalized_doctypes>&lt;refs count="1">&lt;/refs>&lt;addresses count="0">&lt;/addresses>&lt;category_info>&lt;headings count="1">&lt;heading>Science &amp;amp; Technology&lt;/heading>&lt;/headings>&lt;subheadings count="1">&lt;subheading>Technology&lt;/subheading>&lt;/subheadings>&lt;subjects count="3">&lt;subject ascatype="traditional" code="NU">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="extended">Information Science &amp;amp; Library Science&lt;/subject>&lt;subject ascatype="traditional" code="NU">INFORMATION SCIENCE &amp;amp; LIBRARY SCIENCE&lt;/subject>&lt;/subjects>&lt;/category_info>&lt;/fullrecord_metadata>&lt;item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="itemType_wos">&lt;ids avail="Y">PA353&lt;/ids>&lt;bib_id>43 (4): 356-357 1982&lt;/bib_id>&lt;reprint_contact>&lt;address_spec addr_no="1">&lt;full_address>STANFORD UNIV,STANFORD,CA 94305, USA&lt;/full_address>&lt;organizations count="2">&lt;organization>STANFORD UNIV&lt;/organization>&lt;organization pref="Y">Stanford University&lt;/organization>&lt;/organizations>&lt;city>STANFORD&lt;/city>&lt;state>CA&lt;/state>&lt;country>USA&lt;/country>&lt;zip location="AP">94305&lt;/zip>&lt;/address_spec>&lt;names count="1">&lt;name addr_no="1" role="author" seq_no="1" reprint="Y">&lt;display_name>WEBER, DC&lt;/display_name>&lt;full_name>WEBER, DC&lt;/full_name>&lt;wos_standard>WEBER, DC&lt;/wos_standard>&lt;first_name>DC&lt;/first_name>&lt;last_name>WEBER&lt;/last_name>&lt;/name>&lt;/names>&lt;/reprint_contact>&lt;/item>&lt;/static_data>&lt;dynamic_data>&lt;citation_related>&lt;tc_list>&lt;silo_tc coll_id="WOS" local_count="0">&lt;/silo_tc>&lt;/tc_list>&lt;/citation_related>&lt;cluster_related>&lt;identifiers>&lt;identifier value="0010-0870" type="issn">&lt;/identifier>&lt;/identifiers>&lt;/cluster_related>&lt;/dynamic_data>&lt;/REC>
&lt;/records>
      </records>
    </return>
  </ns2:retrieveByIdResponse></soap:Body>
</soap:Envelope>

If we explicitly decode the outer <records> content fragment, we get:

<records xmlns="http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord">
  <REC r_id_disclaimer="ResearcherID data provided by Clarivate Analytics">
    <UID>WOS:A1976BW18000001</UID>
    <static_data>
      <summary>
        <EWUID>
          <WUID coll_id="WOS" />
          <edition value="WOS.SSCI" />
          <edition value="WOS.SCI" />
        </EWUID>
        <pub_info coverdate="1976" has_abstract="N" issue="3" pubtype="Journal" pubyear="1976" sortdate="1976-01-01" vol="37">
          <page begin="205" end="221" page_count="17">205-221</page>
        </pub_info>
        <titles count="6">
          <title type="source">COLLEGE &amp; RESEARCH LIBRARIES</title>
          <title type="source_abbrev">COLL RES LIBR</title>
          <title type="abbrev_iso">Coll. Res. Libr.</title>
          <title type="abbrev_11">COLL RES LI</title>
          <title type="abbrev_29">COLL RES LIBR</title>
          <title type="item">CENTURY OF COOPERATIVE PROGRAMS AMONG ACADEMIC-LIBRARIES</title>
        </titles>
        <names count="1">
          <name daisng_id="19670132" seq_no="1" role="author">
            <display_name>WEBER, DC</display_name>
            <full_name>WEBER, DC</full_name>
            <wos_standard>WEBER, DC</wos_standard>
            <first_name>DC</first_name>
            <last_name>WEBER</last_name>
          </name>
        </names>
        <doctypes count="1">
          <doctype>Article</doctype>
        </doctypes>
        <publishers>
          <publisher>
            <address_spec addr_no="1">
              <full_address>50 E HURON ST, CHICAGO, IL 60611</full_address>
              <city>CHICAGO</city>
            </address_spec>
            <names count="1">
              <name addr_no="1" role="publisher" seq_no="1">
                <display_name>ASSOC COLL RESEARCH LIBRARIES</display_name>
                <full_name>ASSOC COLL RESEARCH LIBRARIES</full_name>
              </name>
            </names>
          </publisher>
        </publishers>
      </summary>
      <fullrecord_metadata>
        <languages count="1">
          <language type="primary">English</language>
        </languages>
        <normalized_languages count="1">
          <language type="primary">English</language>
        </normalized_languages>
        <normalized_doctypes count="1">
          <doctype>Article</doctype>
        </normalized_doctypes>
        <refs count="41" />
        <addresses count="1">
          <address_name>
            <address_spec addr_no="1">
              <full_address>STANFORD UNIV LIB,STANFORD,CA 94305</full_address>
              <organizations count="2">
                <organization>STANFORD UNIV LIB</organization>
                <organization pref="Y">Stanford University</organization>
              </organizations>
              <city>STANFORD</city>
              <state>CA</state>
              <country>USA</country>
              <zip location="AP">94305</zip>
            </address_spec>
          </address_name>
        </addresses>
        <category_info>
          <headings count="1">
            <heading>Science &amp; Technology</heading>
          </headings>
          <subheadings count="1">
            <subheading>Technology</subheading>
          </subheadings>
          <subjects count="3">
            <subject ascatype="traditional" code="NU">Information Science &amp; Library Science</subject>
            <subject ascatype="extended">Information Science &amp; Library Science</subject>
            <subject ascatype="traditional" code="NU">INFORMATION SCIENCE &amp; LIBRARY SCIENCE</subject>
          </subjects>
        </category_info>
      </fullrecord_metadata>
      <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" coll_id="WOS" xsi:type="itemType_wos">
        <ids avail="Y">BW180</ids>
        <bib_id>37 (3): 205-221 1976</bib_id>
      </item>
    </static_data>
    <dynamic_data>
      <citation_related>
        <tc_list>
          <silo_tc coll_id="WOS" local_count="12" />
        </tc_list>
      </citation_related>
      <cluster_related>
        <identifiers>
          <identifier type="issn" value="0010-0870" />
        </identifiers>
      </cluster_related>
    </dynamic_data>
  </REC>
  <REC r_id_disclaimer="ResearcherID data provided by Clarivate Analytics">
    <UID>WOS:A1982PA35300010</UID>
    <static_data>
      <summary>
        <EWUID>
          <WUID coll_id="WOS" />
          <edition value="WOS.SSCI" />
        </EWUID>
        <pub_info issue="4" pubtype="Journal" sortdate="1982-01-01" has_abstract="N" coverdate="1982" vol="43" pubyear="1982">
          <page end="357" page_count="2" begin="356">356-357</page>
        </pub_info>
        <titles count="6">
          <title type="source">COLLEGE &amp; RESEARCH LIBRARIES</title>
          <title type="source_abbrev">COLL RES LIBR</title>
          <title type="abbrev_iso">Coll. Res. Libr.</title>
          <title type="abbrev_11">COLL RES LI</title>
          <title type="abbrev_29">COLL RES LIBR</title>
          <title type="item">UNIVERSITY LIBRARIANSHIP - STIRLING,JF</title>
        </titles>
        <names count="1">
          <name daisng_id="19669762" seq_no="1" role="author" reprint="Y">
            <display_name>WEBER, DC</display_name>
            <full_name>WEBER, DC</full_name>
            <wos_standard>WEBER, DC</wos_standard>
            <first_name>DC</first_name>
            <last_name>WEBER</last_name>
          </name>
        </names>
        <doctypes count="1">
          <doctype>Book Review</doctype>
        </doctypes>
        <publishers>
          <publisher>
            <address_spec addr_no="1">
              <full_address>50 E HURON ST, CHICAGO, IL 60611</full_address>
              <city>CHICAGO</city>
            </address_spec>
            <names count="1">
              <name addr_no="1" role="publisher" seq_no="1">
                <display_name>ASSOC COLL RESEARCH LIBRARIES</display_name>
                <full_name>ASSOC COLL RESEARCH LIBRARIES</full_name>
              </name>
            </names>
          </publisher>
        </publishers>
      </summary>
      <fullrecord_metadata>
        <languages count="1">
          <language type="primary">English</language>
        </languages>
        <normalized_languages count="1">
          <language type="primary">English</language>
        </normalized_languages>
        <normalized_doctypes count="1">
          <doctype>Review</doctype>
        </normalized_doctypes>
        <refs count="1" />
        <addresses count="0" />
        <category_info>
          <headings count="1">
            <heading>Science &amp; Technology</heading>
          </headings>
          <subheadings count="1">
            <subheading>Technology</subheading>
          </subheadings>
          <subjects count="3">
            <subject ascatype="traditional" code="NU">Information Science &amp; Library Science</subject>
            <subject ascatype="extended">Information Science &amp; Library Science</subject>
            <subject ascatype="traditional" code="NU">INFORMATION SCIENCE &amp; LIBRARY SCIENCE</subject>
          </subjects>
        </category_info>
      </fullrecord_metadata>
      <item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="itemType_wos">
        <ids avail="Y">PA353</ids>
        <bib_id>43 (4): 356-357 1982</bib_id>
        <reprint_contact>
          <address_spec addr_no="1">
            <full_address>STANFORD UNIV,STANFORD,CA 94305, USA</full_address>
            <organizations count="2">
              <organization>STANFORD UNIV</organization>
              <organization pref="Y">Stanford University</organization>
            </organizations>
            <city>STANFORD</city>
            <state>CA</state>
            <country>USA</country>
            <zip location="AP">94305</zip>
          </address_spec>
          <names count="1">
            <name addr_no="1" role="author" seq_no="1" reprint="Y">
              <display_name>WEBER, DC</display_name>
              <full_name>WEBER, DC</full_name>
              <wos_standard>WEBER, DC</wos_standard>
              <first_name>DC</first_name>
              <last_name>WEBER</last_name>
            </name>
          </names>
        </reprint_contact>
      </item>
    </static_data>
    <dynamic_data>
      <citation_related>
        <tc_list>
          <silo_tc coll_id="WOS" local_count="0" />
        </tc_list>
      </citation_related>
      <cluster_related>
        <identifiers>
          <identifier value="0010-0870" type="issn" />
        </identifiers>
      </cluster_related>
    </dynamic_data>
  </REC>
</records>

Sure enough the specification for our response is woksearch:retrieveByIdResponse:

<xs:complexType name="retrieveByIdResponse">
  <xs:sequence>
    <xs:element minOccurs="0" name="return" type="woksearch:fullRecordSearchResults"/>
  </xs:sequence>
</xs:complexType>

and woksearch:fullRecordSearchResults in turn is:

<xs:complexType name="fullRecordSearchResults">
  <xs:sequence>
    ...
    <xs:element minOccurs="0" name="records" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

So the payload of records is formally defined as a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment