I want to use a SOAP web service in a Metro App, using WinJS. What is the best way to do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will need to use the WinJS.xhr object to make the call to your SOAP webservice. Your not mentioning that many details about the soap request you want to make, so i created a little dummy code which you need to fill in with your own paramters:
Please note that only the url property in the xhr request is mandatory. If you don’t have a username/password you can just remove these values from the object. Additional if you need to send data with your request (for example if you do a POST request) than you can use the data property to enter that data.
Additional here’s a post on MSDN about consuming a webservice with WinJS.Xhr http://msdn.microsoft.com/en-us/library/windows/apps/hh868282.aspx
(Please note that this is not a SOAP webservice, but they explain the concept of consuming webservices)