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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sbumeshqlik
Contributor III
Contributor III

Need to call webservice macro from load script

Hello,

In my QV,  I have  macro to call  webservice 

function getAirportWSDL(vInput)

   

vURL = "http://www.webservicex.com/airport.asmx/getAirportInformationByISOCountryCode?CountryAbbrviation="+ vInput

    'set txt1 = ActiveDocument.Variables("vXMLSent")

    'txt1.setContent "Null", true

    'Create xmlhttp opject

    Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

    xmlhttp.open "GET", vURL, false

    xmlhttp.setRequestHeader "Content-Type", "text/xml"

    xmlhttp.send ""

    result = xmlhttp.responseText

   

    result = replace(result, ">", ">")

    result = replace(result, "&lt;", "<")

    

    set txt = ActiveDocument.Variables("vXMLReceived")

    txt.setContent result, true

    'getAirportWSDL = vInput

End Function 

-----------------------------------------------------------------------------------------

in my load script,after  reloading,   it is not fetching any values to vXMLReceived

let vXMLReceived  = ' ';

LET Creat =   getAirportWSDL( 'BH');

Any help, would be appreciated.

Regards,

Umesh.

11 Replies
sbumeshqlik
Contributor III
Contributor III
Author

Thanks a lot, for all your help.   Will start a new question about XML String Parsing.

sbumeshqlik
Contributor III
Contributor III
Author

Hi Petter,

Started a new question about "XML string parsing, in QV LOAD script"

enclosed URL below

https://community.qlik.com/message/779723?et=watches.email.thread#779723t

On Mon, May 18, 2015 at 2:17 AM, Petter Skjolden <qcwebmaster@qlikview.com>