<?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: Decode base64 with tJava component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377939#M139750</link>
    <description>&lt;P&gt;Hello @Richard Hall​&amp;nbsp;, @Shicong Hong​&amp;nbsp;: sorry for answering late, I had an unexpected holiday week... I restarted working on this topic, I can provide you more detail: in fact, my question must be pretty simple for you, hopefully: how can I pass the string I have from the API to Java component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here it is my full block:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000OAwe5AAD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136518i2BA34C82AF1834DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000OAwe5AAD.png" alt="0695b00000OAwe5AAD.png" /&gt;&lt;/span&gt;After I call the API I receive a XML file, I extract only the field that I need and the result must be fine (if the same string I use on an online decoder, it will give me the correct .csv file).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The string is something like:&lt;/P&gt;&lt;P&gt;"77u/VVNFUk5BTUUsREVQQVJUTUVOVF9JRCxERVBBUlRNRU5UX05BTUUsRklSU1RfTkFNRSxQRVJT&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;eSBNYW5hZ2VyIiwzMDAwMDAwMjAxNDY2NzIsIlNvY2lhbCBDYXNpbm8gR2FtZXMiCg==&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, once again, I try to use the same code from here: https://community.talend.com/s/feed/0D73p000004kDc1CAE?language=en_US.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't really know how to fill the &lt;/P&gt;&lt;P&gt;String body = "....." part with the result I got.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to Talend, just started working on it 3 weeks ago, I'm doing my best to watch videos, read the community and the documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and once again I'm sorry for answering late, the topic still interest me a lot.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Feb 2022 10:51:31 GMT</pubDate>
    <dc:creator>MStuparu-Ionica</dc:creator>
    <dc:date>2022-02-13T10:51:31Z</dc:date>
    <item>
      <title>Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377936#M139747</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on this thread: &lt;A href="https://community.talend.com/s/feed/0D73p000004kDc1CAE" target="_blank"&gt;https://community.talend.com/s/feed/0D73p000004kDc1CAE&lt;/A&gt;, I try to use a tJava component to decode a base64 encoded very large text. The text looks like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;77u/VVNFUk5BTUUsREVQQVJUTUVOVF9JRCxERVBBUlRNRU5UX05BTUUsRklSU1RfTkFNRSxQRVJT&lt;/P&gt;&lt;P&gt;T05fSUQsTEFTVF9OQU1FLEVOVEVSUFJJU0VfU1RBUlRfREFURSxBU1NJR05NRU5UX1NUQVRVUyxK&lt;/P&gt;&lt;P&gt;T0JfSUQsSk9CX05BTUUsTE9DQVRJT05fSUQsTE9DQVRJT05fTkFNRSxMRUdBTF9FTlRJVFlfSUQs&lt;/P&gt;&lt;P&gt;TEVHQUxfRU5USVRZX05BTUUsVEVSTUlOQVRJT05fREFURSxPRkZCT0FSRElOR19QVUJMSVNIX0RB&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....==&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add it as a String body in the tJava component, but I see in the code the following error messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) For the first row, containing the "77u\":&lt;/P&gt;&lt;P&gt;a) syntax error on token "u", delete this token&lt;/P&gt;&lt;P&gt;b) &amp;lt;rest of the string, after \ character": cannot be resolved to a variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Next rows, have these errors, one by one:&lt;/P&gt;&lt;P&gt;a) syntax error on token &amp;lt;string&amp;gt;, ; expected&lt;/P&gt;&lt;P&gt;b) &amp;lt;string&amp;gt; cannot be resolved to a type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me and tell me what am I doing wrong.&lt;/P&gt;&lt;P&gt;The encoded text I got after calling an Oracle API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Mihai Stuparu&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:14:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377936#M139747</guid>
      <dc:creator>MStuparu-Ionica</dc:creator>
      <dc:date>2024-11-15T23:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377937#M139748</link>
      <description>&lt;P&gt;You've not really given enough information here. We'd need to see your job layout and the code you have used. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way you can share a complete base64 encoded String that fails (of something that is not private and can be shared freely)?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 11:05:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377937#M139748</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-04T11:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377938#M139749</link>
      <description>&lt;P&gt;Before calling java function to decode the string, print the string text on the console to see what you have from the API. &lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 03:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377938#M139749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-07T03:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377939#M139750</link>
      <description>&lt;P&gt;Hello @Richard Hall​&amp;nbsp;, @Shicong Hong​&amp;nbsp;: sorry for answering late, I had an unexpected holiday week... I restarted working on this topic, I can provide you more detail: in fact, my question must be pretty simple for you, hopefully: how can I pass the string I have from the API to Java component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here it is my full block:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000OAwe5AAD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136518i2BA34C82AF1834DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000OAwe5AAD.png" alt="0695b00000OAwe5AAD.png" /&gt;&lt;/span&gt;After I call the API I receive a XML file, I extract only the field that I need and the result must be fine (if the same string I use on an online decoder, it will give me the correct .csv file).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The string is something like:&lt;/P&gt;&lt;P&gt;"77u/VVNFUk5BTUUsREVQQVJUTUVOVF9JRCxERVBBUlRNRU5UX05BTUUsRklSU1RfTkFNRSxQRVJT&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;eSBNYW5hZ2VyIiwzMDAwMDAwMjAxNDY2NzIsIlNvY2lhbCBDYXNpbm8gR2FtZXMiCg==&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, once again, I try to use the same code from here: https://community.talend.com/s/feed/0D73p000004kDc1CAE?language=en_US.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't really know how to fill the &lt;/P&gt;&lt;P&gt;String body = "....." part with the result I got.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to Talend, just started working on it 3 weeks ago, I'm doing my best to watch videos, read the community and the documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and once again I'm sorry for answering late, the topic still interest me a lot.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 10:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377939#M139750</guid>
      <dc:creator>MStuparu-Ionica</dc:creator>
      <dc:date>2022-02-13T10:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377940#M139751</link>
      <description>&lt;P&gt;@Mihai Stuparu-Ionica​, you should use tJavaRow instead of tJava in your case, pass the result extracted from tExtractXMLField to body like:&lt;/P&gt;&lt;P&gt;String body=input_row.ColumnName;&lt;/P&gt;&lt;P&gt;//then, decode the body string with your Java code &lt;/P&gt;&lt;P&gt;output_row.columnName=yourDecodeFunction(body);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 14:20:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377940#M139751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-13T14:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377941#M139752</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Sorry for bothering, I've been able to solve the problem myself, I told you am still learning.&lt;/P&gt;&lt;P&gt;I used a tJava_Row instead of tJava, like this. I had to replace as well the new lines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;String body = input_row.ns2reportBytes;&lt;/P&gt;&lt;P&gt;body = body.replace("\n","");&lt;/P&gt;&lt;P&gt;java.util.Base64.Decoder decoder = java.util.Base64.getDecoder();&lt;/P&gt;&lt;P&gt;byte[] buf = decoder.decode(body.getBytes(java.nio.charset.StandardCharsets.UTF_8));&lt;/P&gt;&lt;P&gt;String str = new String(buf, java.nio.charset.StandardCharsets.UTF_8);&lt;/P&gt;&lt;P&gt;System.out.println(str);&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 14:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377941#M139752</guid>
      <dc:creator>MStuparu-Ionica</dc:creator>
      <dc:date>2022-02-13T14:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377942#M139753</link>
      <description>&lt;P&gt;Thank you, @Shicong Hong​&amp;nbsp;: this is exactly what I've done, I posted another comment.&lt;/P&gt;&lt;P&gt;Thank you once more.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 14:23:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377942#M139753</guid>
      <dc:creator>MStuparu-Ionica</dc:creator>
      <dc:date>2022-02-13T14:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377943#M139754</link>
      <description>&lt;P&gt;Great, glad to hear that!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 14:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377943#M139754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-13T14:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Decode base64 with tJava component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377944#M139755</link>
      <description>&lt;P&gt;@Shicong Hong​&amp;nbsp;please provide steps once again to convertbase 64 to csv file,&lt;/P&gt;&lt;P&gt;new to talend..&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 11:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Decode-base64-with-tJava-component/m-p/2377944#M139755</guid>
      <dc:creator>SK1694344715</dc:creator>
      <dc:date>2023-10-31T11:03:20Z</dc:date>
    </item>
  </channel>
</rss>

