Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hiba1
Contributor
Contributor

how to extract value from tsoap

Hi , 

i want to extract "countryCode" from tsoap and load it into sql server  .

i try  with this job but i got the value null in the sql table  .

0683p000009M6Ts.png0683p000009M6U2.png0683p000009M6OZ.png

Any help please ! 

Labels (5)
4 Replies
Anonymous
Not applicable

You are looking at this the wrong way I think. The tSoap component will return XML. You need to know the format of the return message before you think about this. Remove all components (deactivate them, don't delete them) and add a tLogRow directly after the tSoap component. This will print the XML to the output window. Show us what is returned and we can help you extract it.

hiba1
Contributor
Contributor
Author

Hi , 

in fact I have already extracted all the data of xml returned by tsoap and I insert them into the table sql .... as you notice I have a dynamic variable in the message soap "countryCode" ... this variable will be recovering with each iteration of the coup I can have all the xml in the response of tsoap (in short the xml are cities each identified by the countryCode) what I want is to insert these countryCode with its cities. I can not do this join.

 

exemple: whene the "countrycode" = A

the xml be like this :

<?xml version="1.0" encoding="UTF-8"?>
<envelope>
<header>
<version port="4002" host="ns001tow.netstorming.net">1.6.1</version>
<timestamp>20190731102936</timestamp>
</header>
<response type="cities" product="hotel">
<cities timestamp="20030423170100">
<city>
<code value="GRZ"/>
<city_tax value="true"/>
<names>
<name language="ru" value="GRAZ"/>
<name language="fr" value="GRAZ"/>
<name language="en" value="GRAZ"/>
<name language="hr" value="GRAZ"/>
<name language="ca" value="GRAZ"/>
<name language="de" value="GRAZ"/>
<name language="it" value="GRAZ"/>
<name language="pt-br" value="GRAZ"/>
<name language="sl" value="GRAZ"/>
<name language="es" value="GRAZ"/>
</names>
</city>
<city>
<code value="TLLN"/>
<city_tax value="false"/>
<names>
<name language="ru" value="TULLN AN DER DONAU"/>
<name language="fr" value="TULLN AN DER DONAU"/>
<name language="en" value="TULLN AN DER DONAU"/>
<name language="zh" value="TULLN AN DER DONAU"/>
<name language="hr" value="TULLN AN DER DONAU"/>
<name language="ca" value="TULLN AN DER DONAU"/>
<name language="de" value="TULLN AN DER DONAU"/>
<name language="it" value="TULLN AN DER DONAU"/>
<name language="pt-br" value="TULLN AN DER DONAU"/>
<name language="es" value="TULLN AN DER DONAU"/>
<name language="sl" value="TULLN AN DER DONAU"/>
<name language="ja" value="TULLN AN DER DONAU"/>
<name language="pl" value="TULLN AN DER DONAU"/>
</names>
</city>
<city>
<code value="VIE"/>
<city_tax value="true"/>
<names>
<name language="ru" value="ВЕНА"/>
<name language="fr" value="VIENNE"/>
<name language="en" value="VIENNA"/>
<name language="nl" value="VIENNA"/>
<name language="hr" value="BEC"/>
<name language="ca" value="VIENA"/>
<name language="de" value="WIEN"/>
<name language="it" value="VIENNA"/>
<name language="pt-br" value="VIENNA"/>
<name language="sl" value="DUNAJ"/>
<name language="es" value="VIENA"/>
</names>
</city>
</cities>
</response>
</envelope>

Anonymous
Not applicable

Oh, sorry I misunderstood. All you need to do then is to add a tMap after your tSoap. This will be used to pass through your XML data and to add an extra column for the country code. Just set the globalMap expression you showed in your first post, in the extra output column. 

hiba1
Contributor
Contributor
Author

Hello,

Thanks, your solution worked