Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用jQuery使用SOAP服务_Jquery_Ajax_Jquery Mobile_Soap_Wsdl - Fatal编程技术网

使用jQuery使用SOAP服务

使用jQuery使用SOAP服务,jquery,ajax,jquery-mobile,soap,wsdl,Jquery,Ajax,Jquery Mobile,Soap,Wsdl,我正在尝试这样做,对于使用Jquery和Jquery Mobile的应用程序: $.ajax({ url: "http://localhost:8080/CalculatorWS/CalculatorWS?WSDL", type : "POST", cache : false, data : '<?xml version="1.0" encoding="UTF-8"?>'+ '<S:Envelope xmlns:S="ht

我正在尝试这样做,对于使用Jquery和Jquery Mobile的应用程序:

$.ajax({
    url:  "http://localhost:8080/CalculatorWS/CalculatorWS?WSDL",
    type : "POST",
    cache : false,
    data : '<?xml version="1.0" encoding="UTF-8"?>'+
           '<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">'+
           '<S:Header/>'+
           '<S:Body>'+
           '<ns2:lista xmlns:ns2="http://calculator.me.org/"/>'+
           '</S:Body>'+
           '</S:Envelope>',
    contentType : "text/xml",
    success : function(data, status) {
        alert(data);
    }
}); 

$( document ).ajaxError(function( event, request, settings ) {
    alert (settings.url);
    alert (request.status);
});
$.ajax({
url:“http://localhost:8080/CalculatorWS/CalculatorWS?WSDL",
类型:“POST”,
cache:false,
数据:“”+
''+
''+
''+
''+
''+
'',
contentType:“text/xml”,
成功:功能(数据、状态){
警报(数据);
}
}); 
$(文档).ajaxError(函数(事件、请求、设置){
警报(settings.url);
警报(请求状态);
});
第一个警报是Web服务的URL,第二个警报是:
0

有什么问题


之后,如果我能在Localhost中获得SOAP服务的信息,我希望,我可以通过Internet为一个应用程序提供这些信息?

可能需要CORS Headers,我会这样做的,谢谢。