Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 .
Any help please !
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.
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>
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.
Hello,
Thanks, your solution worked