added a comment -
20/Jul/08 6:38 AM For 3.0 the problem as described no longer exists. It looks like DWR does not have a problem finding vararg methods. However, the vararg parameter is remoted as an array (as expected). This result of this is that you can't call a var args method from the browser like you would from java. For example:
This Java method:
public void varArgs(String ...strings) {
System.out.println(strings);
}
Is remoted as:
TestVarArgs.varArgs = function(p0, callback) {
return dwr.engine._execute(TestVarArgs._path, 'TestVarArgs', 'varArgs', p0, callback);
};
So you can't do something like this in your JS (without losing arguments):
TestVarArgs.varArgs("vararg1","vararg2", callback);
If we want to support someting like this it looks like we are going to have to change how vararg methods are remoted in DefaultRemoter. Perhaps we can retrieve all of the argument and push them into the array. So the method would be remoted the same:
dwr.engine._execute(TestVarArgs._path, 'TestVarArgs', 'varArgs', p0, callback);
but p0 would contain all of the arguments. The problem with this approach is that it will complicate finding the callback function. Thoughts?
Is there any restriction to use Java 5 API's?