<?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: tFileInputXML couldn't read stream set in globalMap. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327572#M96945</link>
    <description>Hi, 
&lt;BR /&gt;I suspect something wrong with your java code
&lt;BR /&gt;It seems that: 
&lt;BR /&gt;
&lt;PRE&gt;java.io.FileInputStream is2 = new java.io.FileInputStream(&lt;BR /&gt;                                            "F:/Talend/5.3/Talend-Studio-r101418-V5.3.0NB/workspace/in.xlsx",&lt;BR /&gt;                                            false);&lt;BR /&gt;                                            &lt;BR /&gt;                                            globalMap.put("key", is2);&lt;BR /&gt; tFileInputXML&lt;BR /&gt;FileName/Stream value --&amp;gt; ((java.io.FileInputStream)globalMap.get("key"))&lt;/PRE&gt;
&lt;BR /&gt;Your job design is right, for things are working fine when you change it into local file.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
    <pubDate>Tue, 16 Jul 2013 03:49:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-16T03:49:32Z</dc:date>
    <item>
      <title>tFileInputXML couldn't read stream set in globalMap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327571#M96944</link>
      <description>Hi, 
&lt;BR /&gt;Below is my requirement. 
&lt;BR /&gt;I need to read a XML passes as part of command promt. 
&lt;BR /&gt;After reading it, pass it to a tmap to create a true and false flow. 
&lt;BR /&gt;In true flow, the xml read has to passed to a tFileInputXML --&amp;gt; tWriteXMLFiled --&amp;gt; tLogRow. 
&lt;BR /&gt;I am able to create the flow, but the problems occurs in tFileInputXML. 
&lt;BR /&gt;For tFileInputXML i have to read the xml from the inputStream and not from a file. 
&lt;BR /&gt;I have tried using tJava, tJavaFlex and tJavaRow to set the inputstream in the context as follows. 
&lt;BR /&gt;-- java code 
&lt;BR /&gt;java.io.InputStream is2 = new ByteArrayInputStream(context.input.getBytes()); 
&lt;BR /&gt;globalMap.put("iStream", is2); 
&lt;BR /&gt;-- tFileInputXML 
&lt;BR /&gt;FileName/Stream value --&amp;gt; ((java.io.InputStream)globalMap.get("iStream")) 
&lt;BR /&gt;How much ever i try, the stream I set doesn't get picked up in the tFileInputXML. 
&lt;BR /&gt;When I change FileName/Stream value --&amp;gt; to a local file. Things are working fine. So my only problem is how to connect tMap to tFileInputXML by passing the data as stream. 
&lt;BR /&gt;Need your assistance on how to achieve this. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Padmaraj.</description>
      <pubDate>Mon, 15 Jul 2013 19:16:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327571#M96944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-15T19:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputXML couldn't read stream set in globalMap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327572#M96945</link>
      <description>Hi, 
&lt;BR /&gt;I suspect something wrong with your java code
&lt;BR /&gt;It seems that: 
&lt;BR /&gt;
&lt;PRE&gt;java.io.FileInputStream is2 = new java.io.FileInputStream(&lt;BR /&gt;                                            "F:/Talend/5.3/Talend-Studio-r101418-V5.3.0NB/workspace/in.xlsx",&lt;BR /&gt;                                            false);&lt;BR /&gt;                                            &lt;BR /&gt;                                            globalMap.put("key", is2);&lt;BR /&gt; tFileInputXML&lt;BR /&gt;FileName/Stream value --&amp;gt; ((java.io.FileInputStream)globalMap.get("key"))&lt;/PRE&gt;
&lt;BR /&gt;Your job design is right, for things are working fine when you change it into local file.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Tue, 16 Jul 2013 03:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327572#M96945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-16T03:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputXML couldn't read stream set in globalMap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327573#M96946</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi, &lt;BR /&gt;I suspect something wrong with your java code&lt;BR /&gt;It seems that: &lt;BR /&gt;&lt;PRE&gt;java.io.FileInputStream is2 = new java.io.FileInputStream(&lt;BR /&gt;                                            "F:/Talend/5.3/Talend-Studio-r101418-V5.3.0NB/workspace/in.xlsx",&lt;BR /&gt;                                            false);&lt;BR /&gt;                                            &lt;BR /&gt;                                            globalMap.put("key", is2);&lt;BR /&gt; tFileInputXML&lt;BR /&gt;FileName/Stream value --&amp;gt; ((java.io.FileInputStream)globalMap.get("key"))&lt;/PRE&gt;&lt;BR /&gt;Your job design is right, for things are working fine when you change it into local file.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi, 
&lt;BR /&gt;I guess i should have explained things bit more. 
&lt;BR /&gt;Attached is my flow design. 
&lt;BR /&gt;Java code at tJava_1: 
&lt;BR /&gt;java.io.InputStream is = new ByteArrayInputStream(context.input.getBytes()); 
&lt;BR /&gt;globalMap.put("iStream", is); 
&lt;BR /&gt;tFileInputXML_1 : ((java.io.InputStream)globalMap.get("iStream")) 
&lt;BR /&gt; 
&lt;BR /&gt;The above works fine without any issues. tFileInputXML_1 is able to read the value set in globalMap from tJava_1. 
&lt;BR /&gt;Where as the same code used in tJava_2 as below, 
&lt;BR /&gt;java.io.InputStream is = new ByteArrayInputStream(context.input.getBytes()); 
&lt;BR /&gt;globalMap.put("iStream", is); 
&lt;BR /&gt;is not read by, tFileInputXML_2. --&amp;gt; ((java.io.InputStream)globalMap.get("iStream")) 
&lt;BR /&gt;There is no output of rows from tFileInputXML_2. 
&lt;BR /&gt;Kindly help. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Padmaraj. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEnm.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143603i764BFC2CB1FEA1A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEnm.png" alt="0683p000009MEnm.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 16 Jul 2013 06:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327573#M96946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-16T06:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputXML couldn't read stream set in globalMap.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327574#M96947</link>
      <description>Hi Padmaraj 
&lt;BR /&gt;About your job design, I have two suggestions: 
&lt;BR /&gt;1. use oncomponentOK replace iterate. 
&lt;BR /&gt;2. You don't need to add the same code on tJava_2 again, remove tJava_2 from your job if it don't do anything in addition to add the same code as tJava_1. 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 17 Jul 2013 15:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputXML-couldn-t-read-stream-set-in-globalMap/m-p/2327574#M96947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-17T15:45:33Z</dc:date>
    </item>
  </channel>
</rss>

