Exposing Enums from a Web Service
-
I'm writing a web service in .NET that will expose Enumerations to the caller. I know this is possible, I just want to know if it's a good idea. I want to make it inter-operable with other systems, so would exposing an enum work ok? Specifically it will expose a custom object that has an enum inside it as a public property. Many thanks! PS. to see the web service in action visit http://www.dominicpettifer.co.uk/coolApps/whereAmI.aspx[^]. IP Location mapping, not very accurate though.
Dominic Pettifer Blog: www.dominicpettifer.co.uk
-
I'm writing a web service in .NET that will expose Enumerations to the caller. I know this is possible, I just want to know if it's a good idea. I want to make it inter-operable with other systems, so would exposing an enum work ok? Specifically it will expose a custom object that has an enum inside it as a public property. Many thanks! PS. to see the web service in action visit http://www.dominicpettifer.co.uk/coolApps/whereAmI.aspx[^]. IP Location mapping, not very accurate though.
Dominic Pettifer Blog: www.dominicpettifer.co.uk
I have created a public custom class which I exposed through a web service before and have not experienced any problems with it. As long as you make sure that you are not exposing sensitive data, you should be okay. About making it inter-operable with other systems, I am not sure. I've never tested that, but in theory I believe it should work. Hope this helps you.