Daniel Barisch
8/19/2003 3:30:00 PM
Is it possible to use self defined classes as parameters for a WebMethod? I
thought of the following....
1. Library-Project: "LibProj"
Public Class ParamClass
private ...
public ...
public sub addXY...
End Class
2. WebService-Project: "WSProj"
(Reference to "LibProj")
<WebService>
Public Class WServer
<WebMethod> _
Public function getSth( param as LibProj.ParamClass)....
end class
3. Client-Project: "ClientProj"
(Reference to "LibProj", WebReference to "WSProj" as "WSProjProxy")
public sub doSth
dim ws as new WSProjProxy.WServer()
dim pc as new LibProj.ParamClass()
msgbox ws.getSth( pc ) >> ERROR (Parameter "pc")
end sub
This does not work, because " 'LibProj.ParamClass' can't be converted to
'ClientProj.WSProjProxy.ParamClass' "
What is wrong with this code? Why suddenly the type of the
WebService-parameter switches from 'LibProj.ParamClass' (as defined in the
WebMethod) to 'WSProjProxy.ParamClass'?
Is there possibility to get this work?
Thanks, D.Barisch