这可能是一个愚蠢的问题,但这里是
我有一个要求用户登录的phonegap应用程序。 用户存在于我的umbraco安装中。 我正在尝试使用这个webservice /umbraco/webservices/api/MemberService.asmx?op=UserAuthenticates
这是我的phonegap应用中的javascript
var wsUrl = "http://188.228.44.69/umbraco/webservices/api/MemberService.asmx?op=UserAuthenticates";
var soapRequest = 'POST /umbraco/webservices/api/MemberService.asmx HTTP/1.1 \
Host: 188.228.44.69 \
Content-Type: text/xml; charset=utf-8 \
Content-Length: length \
SOAPAction: "http://umbraco.org/webservices/UserAuthenticates" \
<?xml version="1.0" encoding="utf-8"?> \
<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> \
<UserAuthenticates xmlns="http://umbraco.org/webservices/"> \
<username>'+user+'</username> \
<password>'+password+'</password> \
</UserAuthenticates>\
</soap:Body>\
</soap:Envelope>';
$.ajax({
type: "POST",
url: wsUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: function (msg) {
console.log(msg.LoginResult);
},
error: function (msg) {
console.log("nay "+msg);
}
});
但是当我运行代码时,我得到了 “OPTIONS MemberService.asmx?op = UserAuthenticates - 405 Method Not Allowed”
有谁知道如何解决这个问题?
我使用iis 7在Windows Server 2008上运行umbraco