locked
How to consume an xml web service in a metro app in Visual Basic? RRS feed

  • Question

  • The Web Service is here. and is returning Data Table

    I was able to add the Service Reference to the project, but don't know how to proceed from there.

    I need help, thanks..

    Friday, November 16, 2012 5:47 PM

Answers

  • Figured it out,

        Private Async Sub btnnGo_Click(sender As Object, e As RoutedEventArgs) Handles btnGo.Click
            Dim YD = New YoniService.productSoapClient
            Dim YDRes = Await YD.CategoriesAsync()
            Dim cText = ""
            For Each C In YDRes.Any1.Descendants("Categories")
                cText = cText + C.Value() + ",  "
            Next
            txtRes.Text = cText
        End Sub

    • Marked as answer by Issacsim Saturday, November 17, 2012 4:16 PM
    Saturday, November 17, 2012 4:16 PM

All replies

  • the biggest issue you have here is windows store apps do not support data sets/data tables
    Saturday, November 17, 2012 12:21 AM
  • Figured it out,

        Private Async Sub btnnGo_Click(sender As Object, e As RoutedEventArgs) Handles btnGo.Click
            Dim YD = New YoniService.productSoapClient
            Dim YDRes = Await YD.CategoriesAsync()
            Dim cText = ""
            For Each C In YDRes.Any1.Descendants("Categories")
                cText = cText + C.Value() + ",  "
            Next
            txtRes.Text = cText
        End Sub

    • Marked as answer by Issacsim Saturday, November 17, 2012 4:16 PM
    Saturday, November 17, 2012 4:16 PM