Ask a Question related to ASP.NET Web Services, Design and Development.
-
Maik Albrecht #1
Service with 'shared' datatypes
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)
Maik Albrecht Guest
-
Converting Datatypes
Hi, I need to change a varchar field in my DB to a small date/time field. The problem is I don't want to lose the data, as I have quite a lot of... -
sql=access=datatypes?
What would be the corresponding data types for the following existing Access data types: Autonumber = (UniqueIdentifier?) Number =... -
Problem publishing web service on shared server
Gerry, I am having exactly the same symptoms - but I know what the problem is but don't have a fix yet. My hosting provider runs .NET 1.1 and to... -
Shared Fax Problem with Windows 2003 the NETWORK SERVICE account and a Domain Controller
Can you share more details as to what the exact problem is? Service not starting? Not able to send/receive? -- Manoj K Jain Microsoft Printing,... -
Datatypes in Informix
Hi, I am trying to obtain an extract of my Informix database into a formatted spreadsheet. The information of the fields in a table is... -
Dino Chiesa [Microsoft] #2
Re: Service with 'shared' datatypes
I am not certain that I completely understand your problem.
but,
I think you might be able to correct the problem by modifying the generated
webservice proxy classes to reference the datatypes defined in your DLL.
By default a webservice will give you new datatypes - localhost1.DataType1,
localhost1.DataType2, etc
just modify the generated code to reference your externally defined
datatypes, in place of those generated ones.
-D
"Maik Albrecht" <albrecht.m@gmx.de> wrote in message
news:esFruyRiEHA.2880@TK2MSFTNGP10.phx.gbl...to> 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> 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)
>
>
Dino Chiesa [Microsoft] Guest



Reply With Quote

