最后,我将开始我的第一个线程。仅仅通过搜索,我就得到了很多问题的答案,而且至少需要 2-3 年。但是现在,我找不到我的问题的任何答案。所以我想这也可以帮助其他人!
我在另一台服务器上有一个 SOAP 网络服务。
我回来的网址是:https ://dummy.de/testarea/soap/index.php?wsdl
不,我需要取回一个 XML 文件。我知道,跨域 ajax 调用是不可能的,但我找到了一个 jquery 脚本,这使得它成为可能:
https://github.com/padolsey/jQuery-Plugins/tree/master/cross-domain-ajax/
因此,使用该解决方法,我的代码如下所示:
$(document).ready(function() {
$.ajax({
type: "GET",
url: 'https://xxxxxxx/testarea/soap/index.php?wsdl',
dataType: "xml",
success: function(xml) {
alert(xml);
},
error: function(xhr, xml) {
alert(xml);
}
});
});
当我调试时,var XML 显示一个值为“”的 responseText
现在,我不知道问题出在哪里 - 跨域、SOAP Web 服务等
我对 SOAP ajax 请求并不十分熟悉,因此非常感谢您提供有关此方面的帮助和信息!
非常感谢阿德里安