I'm relatively new with web services, and I have used web services that I have created from data in our own database up to now. However, I am attempting to pull data from an external source.
The web service is located at
http://www.webservicex.net/icd9.asmx. I have used the Web Reference wizzard to add it as a service. I've named it RefICD9.
I have a simple datagrid to hold the info, and in the Load Event I have:
If Not Page.IsPostBack Then
Dim ws As New HDCApps.RefICD9.ICD9
Dim ICD91 As New DataSet(ws.GetICD9Level1())
Dim dvICD91 As New DataView(ICD91.Tables(0))
dgICD91.DataSource = dvICD91
dgICD91.DataBind()
End If
Simple. However, it returns an error:
Exception Details: System.IndexOutOfRangeException: Cannot find table 0.
In Debugger, if I stop the program just before defining the dataview, the dataset, ICD91 DataSetName contains the following (the entire return), but it obviously isn't converted to a table, it remains a string:
DataSetName "<NewDataSet>
<Table>
<ICD9Level1ID>2</ICD9Level1ID>
<ICD9Code>140-239</ICD9Code>
<ICD9Description>02. Neoplasms</ICD9Description>
</Table>
[some omitted for length]
<Table>
<ICD9Level1ID>18</ICD9Level1ID>
<ICD9Code>E-Codes</ICD9Code>
<ICD9Description>Supplementary classification of external causes of injury and poisoning</ICD9Description>
</Table>
</NewDataSet>" String
I think the problem is that there isn't a schema with the data. Is that right?
If so, what is the remedy?
Thanks,
Joe