Solarion
Honorary Master
- Joined
- Nov 14, 2012
- Messages
- 21,887
The Service: http://www.service-repository.com/service/overview/-2082028434
Needing some real help here guys. I'm pulling a stream from a web service and this is what I'm getting:
I want to dump the city names into a drop down list. This is what I have so far:
This is the error I'm getting and I can't figure this out:
Needing some real help here guys. I'm pulling a stream from a web service and this is what I'm getting:
- <NewDataSet>
- <Table>
<Country>South Africa</Country>
<City>Alexander Bay</City>
</Table>
- <Table>
<Country>South Africa</Country>
<City>Waterkloof Lmb</City>
</Table>
- <Table>
<Country>South Africa</Country>
<City>Welkom</City>
</Table>
</NewDataSet>
I want to dump the city names into a drop down list. This is what I have so far:
Code:
Public Class Product
Public Property Country() As String
Get
Return m_Id
End Get
Set(value As String)
m_Id = value
End Set
End Property
Private m_Id As Integer
Public Property City() As String
Get
Return m_Name
End Get
Set(value As String)
m_Name = value
End Set
End Property
Private m_Name As String
End Class
Code:
Dim proxySample As New com.webservicex.www.GlobalWeather ' Proxy object.
Dim webreplystring As String = proxySample.GetCitiesByCountry("South Africa")
Dim serializer As New XmlSerializer(GetType(List(Of Product)), New XmlRootAttribute("Table"))
Dim stringReader As New StringReader(webreplystring)
Dim productList As List(Of Product) = DirectCast(serializer.Deserialize(stringReader), List(Of Product))
This is the error I'm getting and I can't figure this out:
{"<NewDataSet xmlns=''> was not expected."}
