<?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: ESB: REST service return empty items instead of 404 in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298770#M71195</link>
    <description>&lt;P&gt;thx I will try it.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Aug 2017 08:15:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-15T08:15:38Z</dc:date>
    <item>
      <title>ESB: REST service return empty items instead of 404</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298768#M71193</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have design an ESB module for REST services. My ESB is developed as follows (see attachement):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tPostgresqlConnection -&amp;gt; RestInterface -&amp;gt; tFlowtoIterate -&amp;gt; tPostgresInput -&amp;gt; tXMLMap -&amp;gt; tRestresponse&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The REST service works good. But if the SQL query under tPostgresInput have no response the REST service return an 404. It is possibly to return an empty JSONS (for example {items:{}}) ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greets&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Benjamin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298768#M71193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: ESB: REST service return empty items instead of 404</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298769#M71194</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;You can check the number of lines are read from tPostGresInput and generate different response, for example:&lt;BR /&gt;tPostgresqlConnection -&amp;gt; RestInterface -&amp;gt; tFlowtoIterate -&amp;gt; tPostgresInput -&amp;gt;&lt;/P&gt; 
&lt;P&gt;tHashOutput-- runif1--thashinput--tXMLMap 1-&amp;gt; tRestresponse1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --runIf2--tfixedFlowInput--tXMLMap2--trestresponse2&lt;BR /&gt;thashoutput: cache the query data into memory.&lt;BR /&gt;thashinput: read the data from memory.&lt;BR /&gt;&lt;BR /&gt;set the condition of runif1 as:&lt;BR /&gt;((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))&amp;gt;0&lt;BR /&gt;&lt;BR /&gt;set teh condition of runif2 as:&lt;BR /&gt;((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))==0&lt;BR /&gt;&lt;BR /&gt;tfixedFlowInput: you can customize the response string such as : "no data found" and assign it to output Document on tXMLMap2.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shong&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 05:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298769#M71194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-15T05:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: ESB: REST service return empty items instead of 404</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298770#M71195</link>
      <description>&lt;P&gt;thx I will try it.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 08:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ESB-REST-service-return-empty-items-instead-of-404/m-p/2298770#M71195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-15T08:15:38Z</dc:date>
    </item>
  </channel>
</rss>

