Use SOAP API in Metro style app
-
Friday, December 16, 2011 7:25 PM
Hello,
I want to port my WP7 app to Windows 8.
My app consumes data from a SOAP web service and this is the way I used the API in WP7:
SoapClient client = new SoapClient(); client.GetMethodCompleted += new EventHandler<GetMethodCompletedEventArgs>(client_GetMethodCompleted); client.GetMethodAsync(); //somewhere else there is the event handler: void client_GetMethodCompleted(object sender, GetMethodCompletedEventArgs e) { //do something with e.Result here }
However, in Windows 8 and don't know how to add an event handler to the client.I can call the Async methods but without any event handler I don't know how to parse the data I receive.
Any ideas?
All Replies
-
Saturday, December 17, 2011 2:39 AMModerator
SOAP 1.1 is supported for Metro apps. See this previous thread.
Is your problem getting the raw data or parsing it after you receive it?
Using await to call the async method will generally replace your completed event and instead just return the results from the call.
--Rob
- Marked As Answer by Matt SmallMicrosoft Employee, Moderator Thursday, February 09, 2012 5:14 PM
-
Sunday, December 18, 2011 5:29 PM
Thank you for your response.
I am rather unexperienced with C# so I am sorry if this has been answered before, but I was unbable to find anything here nor on other forums.
Could you post a couple of sample lines of code that would illustrate how I have to make the API call and how I can store the returned result as a variable?
Once I have the response stored I belive I can reuse most of my WP7 code to parse the data.
This would be very helpful.
-Philipp
-
Wednesday, October 24, 2012 1:35 PM
Hey Rob, I have a problem of getting raw data and still seeking a way to read it.... I guess you can help :)


