C
Charlieee
Has anyone tried sending an Enum as a parameter to a web service?
We can only get it to work if we take the Enum and cast it to an int then
parse it back within the web method.
The docs show that Enum is [Serializable] so we are thinking that it should
just serialize itself to the web method via .NET.
This should work???
WebServiceProxy.GetSomething(myEnum.ExtendedStuff, otherParameters);
(myEnum is defined in both the Client and Web Service.)
Once we cast with int, everything works well, for example:
WebServiceProxy.GetSomething((int)myEnum.GetExtendedStuff, otherParameters);
We've also tried:
WebServiceProxy.GetSomething(WebServiceProxy.myEnum.GetExtendedStuff, .....)
But the system hangs.
Is it necessary to cast or is there something we are missing?
Charlie
We can only get it to work if we take the Enum and cast it to an int then
parse it back within the web method.
The docs show that Enum is [Serializable] so we are thinking that it should
just serialize itself to the web method via .NET.
This should work???
WebServiceProxy.GetSomething(myEnum.ExtendedStuff, otherParameters);
(myEnum is defined in both the Client and Web Service.)
Once we cast with int, everything works well, for example:
WebServiceProxy.GetSomething((int)myEnum.GetExtendedStuff, otherParameters);
We've also tried:
WebServiceProxy.GetSomething(WebServiceProxy.myEnum.GetExtendedStuff, .....)
But the system hangs.
Is it necessary to cast or is there something we are missing?
Charlie