<?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: Help with SOAP request: bad characters and looping values in Data Movement &amp; Streaming</title>
    <link>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163028#M1747</link>
    <description>&lt;P&gt;Update:&lt;/P&gt;
&lt;P&gt;Changing the Query header value fixed the accentuation issue&lt;/P&gt;
&lt;P&gt;from: text/xml&lt;/P&gt;
&lt;P&gt;to: text/xml;charset=UTF-8&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I need to learn how pass keys to the body &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 20:05:14 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2024-01-18T20:05:14Z</dc:date>
    <item>
      <title>Help with SOAP request: bad characters and looping values</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163025#M1746</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I'm very noob into the subject, but I'm very persistent and managed to succeed a connection to a government API for addresses in Brazil. It's a SOAP API that will return the complete address of a location based on a "zip code" as a parameter key.&lt;/P&gt;
&lt;P&gt;So far so good, but now I got 2 problems:&lt;/P&gt;
&lt;P&gt;1. The return is giving me "?" chars for characters with accentuation (I assume it's something related to unicode settings, etc.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="therealdees_1-1705606912318.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127350i74DA36BA63EF05B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="therealdees_1-1705606912318.png" alt="therealdees_1-1705606912318.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I have no idea how to pass the different keys I'm trying to check, since the request body already carries a key.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following link has helped me to structure the connection and parameters:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/How-to-call-a-SOAP-service-with-the-Qlik-Sense-REST-connector/ta-p/1714335" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/How-to-call-a-SOAP-service-with-the-Qlik-Sense-REST-connector/ta-p/1714335&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The API URL is:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl" target="_blank"&gt;https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The request body I'm using:&lt;/P&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR /&gt;&amp;lt;x:Envelope xmlns:x="&lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;" xmlns:cli="&lt;A href="http://cliente.bean.master.sigep.bsb.correios.com.br/" target="_blank"&gt;http://cliente.bean.master.sigep.bsb.correios.com.br/&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;x:Header/&amp;gt;&lt;BR /&gt;&amp;lt;x:Body&amp;gt;&lt;BR /&gt;&amp;lt;cli:consultaCEP&amp;gt;&lt;BR /&gt;&amp;lt;cep&amp;gt;47850011&amp;lt;/cep&amp;gt;&lt;BR /&gt;&amp;lt;/cli:consultaCEP&amp;gt;&lt;BR /&gt;&amp;lt;/x:Body&amp;gt;&lt;BR /&gt;&amp;lt;/x:Envelope&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The query headers:&lt;/P&gt;
&lt;P&gt;Name: Content-Type&lt;/P&gt;
&lt;P&gt;Value: text/xml&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="therealdees_2-1705606942350.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127351i9A395F91C76F6DF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="therealdees_2-1705606942350.png" alt="therealdees_2-1705606942350.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="therealdees_3-1705606949608.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127352i7468BDA8DF457D79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="therealdees_3-1705606949608.png" alt="therealdees_3-1705606949608.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I fix the characters to show the real letters with accentuation, or at least replace them for the same letters without accentuation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I pass different values to the body request so I can add this to a script routine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a public API so it should work for anyone. You could try using the following (random) zip codes to test (consider I'd have a list of values in a table that I must loop and form a new table or update the previous):&lt;/P&gt;
&lt;P&gt;13345731&lt;BR /&gt;03383010&lt;BR /&gt;86055774&lt;BR /&gt;71705008&lt;BR /&gt;06803000&lt;BR /&gt;47850011&lt;BR /&gt;85903220&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 22:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163025#M1746</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2025-03-19T22:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SOAP request: bad characters and looping values</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163028#M1747</link>
      <description>&lt;P&gt;Update:&lt;/P&gt;
&lt;P&gt;Changing the Query header value fixed the accentuation issue&lt;/P&gt;
&lt;P&gt;from: text/xml&lt;/P&gt;
&lt;P&gt;to: text/xml;charset=UTF-8&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I need to learn how pass keys to the body &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 20:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163028#M1747</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-18T20:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SOAP request: bad characters and looping values</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163044#M1748</link>
      <description>&lt;P&gt;After a deep research I managed to do it using the WITH CONNECTING (you must turn it on in the connection settings)&lt;/P&gt;
&lt;P&gt;If it helps anyone in the future, this is the final code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIB CONNECT TO 'PP:API_Correios';&lt;/P&gt;
&lt;P&gt;Temp:&lt;BR /&gt;LOAD * Inline [cep&lt;BR /&gt;05590090&lt;BR /&gt;06803000&lt;BR /&gt;02352000&lt;BR /&gt;06820330&lt;BR /&gt;06707100&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;LET vRowCount = NoOfRows('Temp');&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;For i = 0 to '$(vRowCount)' - 1&lt;/P&gt;
&lt;P&gt;LET vCEP = Peek('cep', $(i), 'Temp');&lt;/P&gt;
&lt;P&gt;SET vBody = &lt;BR /&gt;&amp;lt;?xml version=""1.0"" encoding=""utf-8""?&amp;gt;&lt;BR /&gt;&amp;lt;x:Envelope xmlns:x=""&lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;"" xmlns:cli=""&lt;A href="http://cliente.bean.master.sigep.bsb.correios.com.br/" target="_blank"&gt;http://cliente.bean.master.sigep.bsb.correios.com.br/&lt;/A&gt;""&amp;gt;&lt;BR /&gt;&amp;lt;x:Header/&amp;gt;&lt;BR /&gt;&amp;lt;x:Body&amp;gt;&lt;BR /&gt;&amp;lt;cli:consultaCEP&amp;gt;&lt;BR /&gt;&amp;lt;cep&amp;gt;$(vCEP)&amp;lt;/cep&amp;gt;&lt;BR /&gt;&amp;lt;/cli:consultaCEP&amp;gt;&lt;BR /&gt;&amp;lt;/x:Body&amp;gt;&lt;BR /&gt;&amp;lt;/x:Envelope&amp;gt;;&lt;/P&gt;
&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"attr:soap" AS "soap",&lt;BR /&gt;"__KEY_Envelope",&lt;BR /&gt;(SELECT &lt;BR /&gt;"__KEY_Body",&lt;BR /&gt;"__FK_Body",&lt;BR /&gt;(SELECT &lt;BR /&gt;"attr:ns2" AS "ns2",&lt;BR /&gt;"__KEY_consultaCEPResponse",&lt;BR /&gt;"__FK_consultaCEPResponse",&lt;BR /&gt;(SELECT &lt;BR /&gt;"bairro",&lt;BR /&gt;"cep",&lt;BR /&gt;"cidade",&lt;BR /&gt;"complemento2",&lt;BR /&gt;"end",&lt;BR /&gt;"uf",&lt;BR /&gt;"__FK_return"&lt;BR /&gt;FROM "return" FK "__FK_return")&lt;BR /&gt;FROM "consultaCEPResponse" PK "__KEY_consultaCEPResponse" FK "__FK_consultaCEPResponse")&lt;BR /&gt;FROM "Body" PK "__KEY_Body" FK "__FK_Body")&lt;BR /&gt;FROM XML "Envelope" PK "__KEY_Envelope"&lt;BR /&gt;With Connection(&lt;BR /&gt;BODY "$(vBody)");&lt;/P&gt;
&lt;P&gt;Next i;&lt;/P&gt;
&lt;P&gt;Return:&lt;BR /&gt;LOAD &lt;BR /&gt;cep&lt;BR /&gt;,end as rua&lt;BR /&gt;,bairro&lt;BR /&gt;,cidade&lt;BR /&gt;,complemento2 as complemento&lt;BR /&gt;,uf&lt;BR /&gt;Resident RestConnectorMasterTable&lt;BR /&gt;Where Not IsNull([__FK_return]);&lt;/P&gt;
&lt;P&gt;Drop Tables RestConnectorMasterTable, Temp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 20:53:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/Help-with-SOAP-request-bad-characters-and-looping-values/m-p/2163044#M1748</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-18T20:53:26Z</dc:date>
    </item>
  </channel>
</rss>

