Are enumerated values allowed in Eclipse / Domino Designer web service provider? I set my compiler to 1.6 and it allows me to declare enums, but when I try to incorporate it in the service without messing with the WSDL directly, it gives "The requested operation failed".
-
Possible duplicate of [Unable to fix "Syntax error, 'for each' statements are only available if source level is 1.5"](http://stackoverflow.com/questions/34273144/unable-to-fix-syntax-error-for-each-statements-are-only-available-if-source) – JAL Dec 15 '15 at 21:30
2 Answers
There are advices to set JavaCompilerTarget=1.5
in notes.ini, then restart Notes. But it does not work for me (Notes 8.5.3).
I solve this task using the following steps.
- Create new webservice provider and declare Java 1.5 specific field inside of webservice class. For instance:
private java.util.List<Integer> myList;
- Then click on lightbulb icon at the left and select "Change project compliance and JRE to 1.5"
- Remove `myList declaration and save the class.
Now you can use Java 1.5 specific declarations such as enums.
The same approach works elsewhere in Notes, where you want to solve the same task. Not only for WebService providers.

- 1
- 1
This is a bug in IBM Designer, it won't save the Java Compiler Version. You have to set the target version in every agent on it's own.
Take a look at this answer for detailed description solve your problem.
Edit
To set the compliance level for an agent open the agent and open a java class. Open Menu Project / Properties -> Java Compiler. Set to "Enable Project special settings" and set "Compiler Compliance Level" to 1.6.
-
-
@JAL Sorry, I can't flag questions as duplicate, because I don't have 3000 reputation points, but you can. – notes-jj Dec 15 '15 at 21:21
-
You don't need 3000 rep to flag a question as a duplicate. You should be able to flag at 10 rep. – JAL Dec 15 '15 at 21:23
-
@JAL Unfortunately that's not true, I can't even comment on any question, only in reply. [Privileges](http://stackoverflow.com/help/privileges) – notes-jj Dec 15 '15 at 21:28
-
Ah I am mistaken, it looks like 50 rep is required. Voted to close as a dupe. – JAL Dec 15 '15 at 21:29
-
@JAL Ok, I was mistaken, 50 is enough. 3000 is for moderation of duplicates. Have a nice day :) – notes-jj Dec 15 '15 at 21:34