当我打网络服务器时发生500内部服务器错误
问题描述:
任何人都可以帮助我吗?我的网络服务给我一个错误。当我打网络服务器时发生500内部服务器错误
500内部服务器错误
and
304不Modified`
这将返回我的XML数据。我无法获得所需数据的正文。
var soapMessage ='<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> <HelloWorld xmlns="http://5.79.57.16:8095/" /> </soap:Body> </soap:Envelope>' ;
$j.ajax({
url: 'http://www.lsbo.co.uk:8095/Service1.asmx/HelloWorld',
type: "POST",
data: soapMessage,
dataType: "xml",
contentType: "text/xml; charset=utf-8",
statusCode: {
200: function() {
if (304 == jqxhr.status)
alert("not modified"); // does not fire
}
},
error: function (responseData) {
alert("Error: " + jQuery.parseXML(responseData));
},
}).done(function (data) {
alert("Hye Successfull");
});
答
500是内部服务错误。我的猜测是,你正在向服务器发送一些数据,而不是期望的。乍一看,您的Ajax请求看起来很好。我会在调试中为您的服务设置一个中断点,并查看它正在获取的数据以及它是否与期望的数据不同。
看起来像一个跨域请求。在这种情况下,您可能必须使用'jsonp' –
错误500从服务器端来回传输,无法对JavaScript代码执行任何操作。 –
那么,如果你打* web服务,你期望什么? – KooiInc