yes, i run the code successfully  on the sandbox ,but i can't get the
response data, the result  of obj.data and obj.text =="",
that is why i think i have a error,

so how can i get data from the response ,
i request the webservice on a html  and use ajax method  ,that can get
the data successfully  .

how can i use the makerequest method for post data and get the
response data

i use the method wrong ?
the html code :
<body>
<script type="text/javascript">
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (err) {
xmlhttp = null;
}
}
if(!this.xmlhttp && typeof XMLHttpRequest != "undefined") xmlhttp =
new XMLHttpRequest();
if (this.xmlhttp){ alert("success");}

function test(){
var data;
data = '<?xml version="1.0" encoding="utf-8"?>';
data = data + '<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/";>';
data = data + '<soap:Body>';
data = data + '<IdentityCard xmlns="http://webservice.jaron.cn/";>';
data = data + '<IdentityCardID>330226</IdentityCardID>';
data = data + '<LicenceKey>111</LicenceKey>';
data = data + '</IdentityCard>';
data = data + '</soap:Body>';
data = data + '</soap:Envelope>';

var URL="http://webservice.jaron.cn/default.asmx?op=IdentityCard";;

try {
xmlhttp.Open("POST",URL, true);
xmlhttp.onreadystatechange=loginStatusProc;
xmlhttp.SetRequestHeader ("Content-Type","text/xml; charset=utf-8");
xmlhttp.SetRequestHeader ("SOAPAction","http://webservice.jaron.cn/
IdentityCard");
xmlhttp.Send(data);
} catch (e) {  alert("catch");}
}
function loginStatusProc(){
 if (xmlhttp.readyState==4) {
 if (xmlhttp.status==200) {
 doc =new ActiveXObject("Microsoft.XMLDOM");
 alert(xmlhttp.responseText);
} else if (xmlhttp.status == 500){
alert(xmlhttp.status);
 } else {alert(xmlhttp.readyState);}  }}    </script><input

type=button value="test" onclick="test()"/>

</body>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to