Just return a struct with the first and second fields filled out with the arguments. final EchoStruct result = new EchoStruct(); result.setFirst(first); result.setSecond(second); return result;
final EchoStruct result = new EchoStruct(); result.setFirst(first); result.setSecond(second); return result;