Forum Discussion

heath_howe's avatar
heath_howe
Occasional Contributor
10 years ago

web service parameter value changed

I am using TestComplete to access a very simple internal web service that feeds data to a SQL database. When I do this in TestComplete, the string RecordData is stored in the database with the delimi...
  • heath_howe's avatar
    heath_howe
    10 years ago

    I've done little to troubleshoot this matter, but ran across the jscript implementation of webservice calls and that's the workaround I've pursued. For anyone else interested, here is the function (indentation notwithstanding) as it is working for me:

    function CallWS(wsURL, wsRequest, wsMethod)
    {
    var xmlResponse;
    var xmlResult;
    var XmlHttpRequest = new ActiveXObject("MSXML2.XMLHTTP.3.0");

    XmlHttpRequest.open("POST", wsURL, false);
    XmlHttpRequest.setRequestHeader("Content-type", "text/xml; charset=utf-8");
    XmlHttpRequest.setRequestHeader("SOAPAction", "http://tempuri.org/" + wsMethod);
    XmlHttpRequest.send(wsRequest);

    xmlResponse = XmlHttpRequest.responseXML;
    xmlResult = xmlResponse.text;
    if (xmlResult == "")
    {
    xmlResult = xmlResponse.xml;
    }
    return xmlResult;
    }