<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: XML API - Loop through list to update dynamic URL HTTP GET in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332955#M101783</link>
    <description>&lt;P&gt;Sorry if I missed it, but I did not understand your question. What is the issue you are facing?&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2017 02:26:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-07-15T02:26:48Z</dc:date>
    <item>
      <title>XML API - Loop through list to update dynamic URL HTTP GET</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332954#M101782</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So far have had fantastic support from this community and the product is exceeding my expectations every day. With some help in an earlier post&amp;nbsp;&lt;A title="XML API to CSV - Content is not allowed" href="/s/feed/0D73p000004kBWlCAM#M7220&amp;nbsp;" target="_self"&gt;https://community.talend.com/t5/Design-and-Development/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/31024#M7220&lt;/A&gt;i was able to succesfully build my first ETL job.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now i am working on a second part of the solution which requires&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;Firstly get a list of valid upcoming dates and race types (&lt;A href="https://tatts.com/pagedata/racing/racing.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/racing.xml&lt;/A&gt;) 
  &lt;UL&gt; 
   &lt;LI&gt;&lt;SPAN&gt;@MeetingDate,&amp;nbsp;@MeetingCode&lt;/SPAN&gt;&lt;/LI&gt; 
  &lt;/UL&gt; &lt;/LI&gt; 
 &lt;LI&gt;&amp;nbsp;Then from the list above it passes to the next HTTP request to loop through each date and meeting code 
  &lt;UL&gt; 
   &lt;LI&gt;&lt;A href="https://tatts.com/pagedata/racing/2017/7/15/BRFields.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/2017/7/15/BRFields.xml&lt;/A&gt;&lt;/LI&gt; 
  &lt;/UL&gt; &lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;So the values thet need to get passed from the first XML list are&amp;nbsp;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;&lt;SPAN&gt;@MeetingDate: "2017/7/15" in the URL (this can change, e.g 2017/7/16, etc what ever is in the list)&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;@MeetingCode: "BR" in the URL (this can change, either BR, NR,TR,DR etc etc&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;Both meeting date and code will always be unique&amp;nbsp;on a specific day. there will never been the same date and code together on the same date.&lt;/SPAN&gt;&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;At present i have a simple job build which basically&amp;nbsp;calls&amp;nbsp;the current date and rotates&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XMLList_talend.JPG" style="width: 817px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvX7.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145841i80A9C6DBDB32190F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvX7.jpg" alt="0683p000009LvX7.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;tloop:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tloop.JPG" style="width: 848px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvUE.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152568iF30EADFAEB9B8F08/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvUE.jpg" alt="0683p000009LvUE.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;tjava:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tjava.JPG" style="width: 858px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvXC.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142336i9938D73658716344/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvXC.jpg" alt="0683p000009LvXC.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;HTTPRequest&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thttprequest.JPG" style="width: 792px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lv7W.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148101i2334CC9B0C26828C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lv7W.jpg" alt="0683p000009Lv7W.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks All, any ideas would be much appreciated&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ill continue working through it if i find anything ill post back&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regards&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;david&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 02:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332954#M101782</guid>
      <dc:creator>DavidETL</dc:creator>
      <dc:date>2017-07-15T02:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: XML API - Loop through list to update dynamic URL HTTP GET</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332955#M101783</link>
      <description>&lt;P&gt;Sorry if I missed it, but I did not understand your question. What is the issue you are facing?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 02:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332955#M101783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-15T02:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: XML API - Loop through list to update dynamic URL HTTP GET</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332956#M101784</link>
      <description>Hi David 
&lt;BR /&gt;You need to use a tFlowToiterate to iterate each pair of MeetingDate and MeetingCode extracted from the first XML list, eg: 
&lt;BR /&gt;tHttpRequest1 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tFileInputXML--main(row1)--tFlowToIterate--iterate--tJava--oncomponentok--tHttpRequest2--oncomponentok--other components 
&lt;BR /&gt; 
&lt;BR /&gt;on tHttpRequest: call the first API ( 
&lt;A href="https://tatts.com/pagedata/racing/racing.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/racing.xml&lt;/A&gt;) and store the response to a XML file. 
&lt;BR /&gt; 
&lt;BR /&gt;tFileInputXML: read the response XML file, and extract two fields: MeetingDate and MeetingCode 
&lt;BR /&gt; 
&lt;BR /&gt;on tJava: build the dynamic URL for used later. 
&lt;BR /&gt;String stringDate=(TalendDate.formatDate("yyyy/MM/dd", row1.MeetingDate)).replaceAll("/0","/"); 
&lt;BR /&gt;context.URL=" 
&lt;A href="https://tatts.com/pagedata/racing/&amp;quot;+stringDate+&amp;quot;/&amp;quot;+row1.MeetingCode+&amp;quot;Fields.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/"+stringDate+"/"+row1.MeetingCode+"Fields.xml&lt;/A&gt;"; 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Sat, 15 Jul 2017 04:42:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332956#M101784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-15T04:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: XML API - Loop through list to update dynamic URL HTTP GET</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332957#M101785</link>
      <description>&lt;P&gt;Hi Shong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting this error in the JAVA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error in the component's properties:URL cannot be resolved or is not a field&lt;BR /&gt;URL cannot be resolved or is not a field&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;String stringDate=(TalendDate.formatDate("yyyy/MM/dd",row1.MeetingDate)).replaceAll("/0","/");&lt;BR /&gt;context.URL="&lt;A href="https://tatts.com/pagedata/racing/&amp;quot;+stringDate+&amp;quot;/&amp;quot;+row1.MeetingCode+&amp;quot;Fields.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/"+stringDate+"/"+row1.MeetingCode+"Fields.xml&lt;/A&gt;";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2017 12:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-Loop-through-list-to-update-dynamic-URL-HTTP-GET/m-p/2332957#M101785</guid>
      <dc:creator>DavidETL</dc:creator>
      <dc:date>2017-07-23T12:09:41Z</dc:date>
    </item>
  </channel>
</rss>

