S
Steven Licciardi
Hello,
I am successfully using the code below to call a webservice from within
JavaScript, however I would like to call another function that takes two
variables, how do I send the two variables using the method below.
var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP");
xmlHTTP.open ("POST", "http://localhost/FastTimes/racetimes.asmx",
false);
xmlHTTP.setRequestHeader( "Content-Type","text/xml; charset=utf-8");
xmlHTTP.setRequestHeader(
"SOAPAction","http://tempuri.org/FastTimes/racetimes/getRaceTimes");
strRequest = "<?xml version='1.0' encoding='utf-8'?>";
strRequest = strRequest + "<soap:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>";
strRequest = strRequest + " <soap:Body>";
strRequest = strRequest + "<getRaceTimesResult
xmlns='http://tempuri.org/' />";
strRequest = strRequest + "</soap:Body>";
strRequest = strRequest + "</soap:Envelope>";
xmlHTTP.send(strRequest);
//alert(xmlHTTP.responseXML.xml);
var resp = unescape(xmlHTTP.responseXML.xml);
Thanks,
Steven
I am successfully using the code below to call a webservice from within
JavaScript, however I would like to call another function that takes two
variables, how do I send the two variables using the method below.
var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP");
xmlHTTP.open ("POST", "http://localhost/FastTimes/racetimes.asmx",
false);
xmlHTTP.setRequestHeader( "Content-Type","text/xml; charset=utf-8");
xmlHTTP.setRequestHeader(
"SOAPAction","http://tempuri.org/FastTimes/racetimes/getRaceTimes");
strRequest = "<?xml version='1.0' encoding='utf-8'?>";
strRequest = strRequest + "<soap:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>";
strRequest = strRequest + " <soap:Body>";
strRequest = strRequest + "<getRaceTimesResult
xmlns='http://tempuri.org/' />";
strRequest = strRequest + "</soap:Body>";
strRequest = strRequest + "</soap:Envelope>";
xmlHTTP.send(strRequest);
//alert(xmlHTTP.responseXML.xml);
var resp = unescape(xmlHTTP.responseXML.xml);
Thanks,
Steven