Delphi Enumerated types in REST Server -


I have a Delphi XE5 (Update 2) program that was created using the standard IDE file. New | Others | DataSnap Server | Datasap REST App Wizard

I do not seem to be able to get the enumerated type to work when a server is used as a parameter of the method. All other server methods work like this, which consider other classes as parameters, strings, etc. When I try to call an anonymous parameter from a web browser, then I receive the error message 'code1' Project Project1.exe exception received class TDBXError message 'TServerMethods1.EnumString method with the server method not found in the list' .

Here is my basic test code:

  type {$ METHODINFO ON} TMyEnum = (meOne, meTwo); TServerMethods1 = class (TDataModule) private {private declaration} public {public declaration} function EchoString (value: string): string; Function reverse string (value: string): string; Function Anthring (Constant Enemy: TMyEnum): String; End; However, the strange thing is that if I am contained in another class and passed a parameter to this class for my method then I can get the enumerated type to work. If I change the enum parameter to assume a value integer, then this is work, but I really do not want to do this. 

Enumeration is not supported as a method argument. If DayNap finds any argument type on a method that does not support it then it will work as if the method does not exist, which can cause you to see.

For a list of supported logic types, look at the TDSServerClass document:


Comments