XMLHttpRequest 无法加载http://ideone.com/api/1/service.wsdl。Access-Control-Allow-Origin 不允许 Origin null。
请在这方面帮助我
<html>
<head>
<title> Web services </title>
<script type="text/javascript" src="jquery.js">
</script>
<script type="text/javascript" src="soapproxy.js">
</script>
<script type="text/javascript">
testob={user:"harisrinivas",pass:"ideonehari"};
function resultcallback(res, xml, text, proxy) {
alert(res);
}
function failurecallback(res, xml, text, proxy) {
alert("SayHello() failed");
}
function gotproxycallback(proxy, wsdl, text) {
if (proxy instanceof SOAPProxy) {
//proxy.SayHello(null, true, resultcallback, failurecallback);
SOAPProxy.prototype.invoke(test, testob, async, resultcallback, faultcallback);
} else {
alert("Proxy not created!");
}
}
$(document).ready(function () {
try {
SOAPProxyFabric.fromUrl("http://ideone.com/api/1/service.wsdl", true, gotproxycallback);
} catch (x) {
alert("Failed to load or parse WSDL!");
}
});
</script>
</head>
<body>
<h1> Web service testing by Hari Srinivas </h1>
</body>
</html>
我正在使用 jquery 和 soapproxy ( http://code.google.com/p/js-soap-proxy/ )。问题是什么 ?我怎样才能消除这个错误..??