Retrieving Entities with Enumerations

I would like to publish a web service which returns a value from a retrieved entity. The entity is retrieved by a search against a enumeration type. Because the web service parameter is of a String type I need to find a way to convert the String to an enumeration type so that I can use it in the retrieve. The only way I can think of doing this is via a Java action which receives the String, iterates through the enumeration and returns a matching enumeration for the String which can then be used in the retrieve action. Is there a better to do this?
1 answers

Create a variable of type enum and use an "if then else" statement:

if InputString = EnumValue1 then "select the enum value you want".

In the retrieve use the variable.