
need help from expert on xmlhttp post
Hello all:
I use xmlhttp SOAPAction to send an xml to server and get xml back.
everything is working in PC, but not working in Mac. Here is the code in
javascript how I send: I need this working in both PC and Mac.
var strSoap= "";
var chr = String.fromCharCode(13)
strSoap += '<?xml version="1.0" encoding="utf-8"?>'+ chr;
strSoap += '<soap:Envelope
xmlns:xsi=" http://www.*-*-*.com/ ;
xmlns:xsd=" http://www.*-*-*.com/ ;
xmlns:soap=" http://www.*-*-*.com/ ;>'+ chr;
strSoap += '<soap:Body>'+ chr;
strSoap += '<' + method + ' xmlns="' + xmlns + '">'+ chr;
for (i=0;i<varArray.length;i++) {
strSoap += '<' + varArray[i][1] + '>' + varArray[i][2] + '</' +
varArray[i][1] + '>' + chr
Quote:
};
strSoap += '</' + method + '>' + chr;
strSoap += '</soap:Body>'+ chr;
strSoap += '</soap:Envelope>' + chr;
//still working here
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
var xmldom = new ActiveXObject("MSXML2.DOMDocument");
xmlhttp.Open("POST", wservuri,false);
xmlhttp.setRequestHeader("Content-Type","text/xml; charset=utf-8");
st = xmlns + "/" + method;
xmlhttp.setRequestHeader("SOAPAction:",st);
//not woking here: alert("Message Sent : " + chr + strSoap);
xmlhttp.Send(strSoap);
//not woking here: alert("Message Sent : " + chr + strSoap + chr + chr +
"Message Received: " + chr + xmlhttp.responseTEXT);
xmldom.loadXML(xmlhttp.responseTEXT);
//end coding
Thanks for any suggestion.
-amyj