请告诉我代码状态有什么问题是 200 好的,但无法从 Web 服务接收记录(响应)它显示错误 null 请帮助我,我尝试从 2 天开始解决它...
var webMethod = "http://www.w3schools.com/webservices/tempconvert.asmx/CelsiusToFahrenheit?callback=?";
var soap ='<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/"> <soap:Body> <CelsiusToFahrenheit xmlns="http://tempuri.org/"> <Celsius>12</Celsius> </CelsiusToFahrenheit> </soap:Body> </soap:Envelope>';
$j.ajax({
type: "POST",
url :webMethod,
data: soap,
dataType :"xml",
contentType:"text/xml; charset=\"utf-8\"",
cache:false,
async: false,
error:function(resp)
{
alert("Error :"+$j.parseXML(resp));
},
}).done(function(response){
console.log(response);
var xmlData =$j(response).find('FahrenheitToCelsiusResult').text();
alert(xmlData);
});
});