我希望在使用WinJS的Metro应用程序中使用SOAP Web服务。如何做到最好?
我希望在使用WinJS的Metro应用程序中使用SOAP Web服务。如何做到最好?
您需要使用WinJS.xhr对象来调用SOAP webservice。由于您没有提及有关要进行的soap请求的许多详细信息,因此我创建了一些虚拟代码,您需要用自己的参数填写:
WinJS.xhr({
type: "GET",
user: accountSid,
password: authKey,
url: "http://yourWebserviceUrl.com",
headers: { "YourSoapHeaders": "WithTheirValues" },
}).then(success, error);
function succes(response)
{
}
function error(error)
{
}