1 |
- function WsCommonClass(e,t,n,o,s,a){var c,r=e,l=t,p=n;isEmptyValue(xmlUtil)&&GetConfigData();xmlDoc.getElementsByTagName("WebServiceURL");if(c=a,l.length!=p.length)return"参数不正确!";var m,i="";i+='<?xml version="1.0" encoding="utf-8"?>',i+='<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/">',i+="<soap:Body>",i+="<"+r+' xmlns="http://tempuri.org/">';for(var h=0;h<l.length;h++)i+="<"+l[h]+">"+p[h]+"</"+l[h]+">";i=i+"</"+r+">",i+="</soap:Body>",i+="</soap:Envelope>";try{m=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{m=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){m=new XMLHttpRequest}}if(null==m||"undefind"==m)return"发生错误";try{m.open("POST",c,!1)}catch(e){try{(m=new ActiveXObject("Microsoft.XMLHTTP")).open("POST",c,!1)}catch(e){(m=new XMLHttpRequest).open("POST",c,!1)}}m.setRequestHeader("Content-Type","text/xml;charset=utf-8"),m.setRequestHeader("SOAPAction","http://tempuri.org/"+r);try{m.onreadystatechange=function(){var e=m.responseXML.getElementsByTagName(r+"Result");o&&o(e,s)},m.send(i)}catch(e){$("#myloading").modal("close"),alert("请求失败!")}}
|