none
Use SOAP API in Metro style app

    Question

  • 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?

    Friday, December 16, 2011 7:25 PM

Answers

  • 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

    Saturday, December 17, 2011 2:39 AM
    Owner

All replies

  • 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

    Saturday, December 17, 2011 2:39 AM
    Owner
  • 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

     

    Sunday, December 18, 2011 5:29 PM
  • Hey Rob, I have a problem of getting raw data and still seeking a way to read it.... I guess you can help :)

    Wednesday, October 24, 2012 1:35 PM