Hi Temil,
Thanks for your help with this, can't figure out why it's not working. It would be a lot easier to explain if I could post screenshots but it always comes up with the error message 'Invalid'. I was trying to post a JPEG and then a PNG file for the screenshot but it wouldn't let me; do you know why this might be?
Anyway, the XML document that makes up the Response from the SOAP Request looks like this (I've edited some parts out because otherwise it is extremely long) :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:retrieveByIdResponse xmlns:ns2="http://woksearch.v3.wokmws.thomsonreuters.com">
<return>
<queryId>2</queryId>
<recordsFound>100</recordsFound>
<recordsSearched>50601246</recordsSearched>
<records><records xmlns="http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord">
<REC r_id_disclaimer="ResearcherID data provided by Thomson Reuters"> <UID>WOS:000266862400001</UID><static_data><summary><EWUID><WUID coll_id="WOS"></WUID><edition value="WOS.SCI"></edition><names count="3"><name seq_no="1" addr_no="1" role="author" reprint="Y"><display_name>Buijs, Arjen E.</display_name><full_name>Buijs, Arjen E.</full_name> ... etc ... </REC>
<REC> ... etc ... </REC>
<REC> ... etc ... </REC>
</records></records>
</return>
</ns2:retrieveByIdResponse>
</soap:Body>
</soap:Envelope>
All the data I am extracting lies within these <REC> tags, so I am trying to extract fields like <full_name> from each <REC> and then pass it into an Excel spreadsheet.
I have managed to display the data exactly as I want it by using a DataSource step just after this SOAP Request/Response which extracts all the necessary fields by using the DataSource as XML and then referencing the XPath of each in the Row and Column sections. When I click the green test button in this window, the Data Log displays all 100 records with a column for each field type. When I try to pass all this data into a DataSink however, it only copies over the first row 100 times into the Excel worksheet.
For example, for the field <full_name> I have made a property called 'Author 1' in the DataSource, set to XML, Source Step is the SOAP Request and Source Property is the Response (the data listed in the code block above). In the Row XPath I then have:
declare namespace ns2='http://woksearch.v3.wokmws.thomsonreuters.com';
declare namespace ns1='http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord';
//ns2:retrieveByIdResponse[1]/return[1]/records[1]/ns1:records[1]/ns1:REC
In the Column XPaths I have:
declare namespace ns1='http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord'; ns1:static_data/ns1:summary/ns1:names/ns1:name[1]/ns1:full_name/text()
When I run the test in this window, this displays a column with the header 'Author 1' and then lists 100 different names. When I transfer this to a DataSink however, it only lists the first row 100 times in the worksheet.
Thanks for your help!
John