Error in accessing web service |
| Mac Vira posted at 11-May-08 01:47 |
I m getting error in accessing web service.
"Value of type1-dimensional array of object can not be converted to System.Collections.ArrayList"
Here is the Code of Web Service:
<WebMethod()> _ Public Function HelloWorld() As String Return "Hello World" End Function
<WebMethod()> _ Public Function GetForms() As ArrayList Dim aList As New ArrayList
aList.Add("abc") aList.Add("abt") aList.Add("abg") aList.Add("abf")
Return aList
End Function The HelloWorld method is working properly but other methos is not working.
Here is Windows App code for accessing service :
Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click Dim ws As New eu.qsh.vbmade2007.FullFormService
Dim dt As New Object Dim tbl As New Data.DataTable Dim lst As New ArrayList
lst = ws.GetForms
End Sub
When i m trying to access the service i got the error "Value of type1-dimensional array of object can not be converted to System.Collections.ArrayList"
I have tried typecasting by CTYPE but it failed.
I have not modified anything else in web service.
Pls help me in this matter.
|
|