M
Maik Albrecht
Hello NG,
I need to write a factory where I be able to switch between webservice
support and normal dll support. So I wrote a small test programm. In this
case I get the problem that I can't find a way to load a komplex datatype
from a dll und use it as a parameter in the service. In normal case the
client will use the datatypes published by the webservice. But so i have to
use the published types in the main programm and are not able to switsch.
Here some code
WebService.dll
<WebMethod()> _
Public Function GetName(ByVal param As [Shared].MyEnum) As String
' The parameter [Shared].MyEnum lost his namespace in the wsdl document
Return "MyName"
End Function
Shared.dll
Public Enum MyEnum
param1
param2
End Enum
Client.exe
Dim dm As New localhost.Service1
Dim a As [Shared].MyEnum
a = [Shared].MyEnum.param1
'Me.Label1.Text = dm.GetName(a) ' not working because it is not the valid
type, but thats the way i need it !
Me.Label1.Text = dm.GetName(localhost.MyEnum.param1)
I need to write a factory where I be able to switch between webservice
support and normal dll support. So I wrote a small test programm. In this
case I get the problem that I can't find a way to load a komplex datatype
from a dll und use it as a parameter in the service. In normal case the
client will use the datatypes published by the webservice. But so i have to
use the published types in the main programm and are not able to switsch.
Here some code
WebService.dll
<WebMethod()> _
Public Function GetName(ByVal param As [Shared].MyEnum) As String
' The parameter [Shared].MyEnum lost his namespace in the wsdl document
Return "MyName"
End Function
Shared.dll
Public Enum MyEnum
param1
param2
End Enum
Client.exe
Dim dm As New localhost.Service1
Dim a As [Shared].MyEnum
a = [Shared].MyEnum.param1
'Me.Label1.Text = dm.GetName(a) ' not working because it is not the valid
type, but thats the way i need it !
Me.Label1.Text = dm.GetName(localhost.MyEnum.param1)