You have to think in terms of requests (method name and arguments) and responses (return type).
If you want to return an object and/or an error, then use a ValueProxy
with two properties, e.g.
@ProxyFor(FindStudentResponse.class)
interface FindStudentResponseProxy extends ValueProxy {
StudentProxy getStudent();
FindError getError();
}
where FindError
would be an enum.