web services return XML results...

wlho

New member
Joined
Oct 5, 2004
Messages
3
Programming Experience
Beginner
i doing a web menu... and the items is getting from a web services... the web method should return an xml with all the authorise item allow for the user to access...
but when my client call the web method, i get this error... "System.InvalidCastException: Specified cast is not valid."
i debug the web services and manage to get the correct XML... but when return to client it give me this error.

here is my sample code...
<WebMethod()> _
Public Function GetAccessControlListByLogin(ByVal Login As String) As System.Xml.XmlDataDocument

Dim objXMLDataDoc As New Xml.XmlDataDocument
strSQL = "SELECT * FROM TASK_ASSIGNMENT WHERE USERID = '" & Login & "' "
dsDataSet = objConnection.ExecuteDataSet(strSQL)
dsDataSet.Namespace = "MenuItem"
dsDataSet.Tables(0).Namespace = "TaskAssignment"
objXMLDataDoc =
New Xml.XmlDataDocument(dsDataSet)
Return objXMLDataDoc
End Function


Dim objAccessControlList As New AccessControlList.AccessControlList
Dim objXMLDataDoc As System.Xml.XmlDataDocument
objXMLDataDoc = objAccessControlList.GetAccessControlListByLogin("alex")


please advice... urgent...
thanks... thanks... thanks...
 
Are you sure that the proxy on the clientside doesn't use another object instead of the XmlDataDocument. You can look this up by the intellisense of your objAccessControlList.GetAccessControlListByLogin(" alex") method and look what it returns
 
Back
Top