My understanding of SOA: Various systems in a business need to do security checks, so it makes sense to use the same process and therefore have a SecurityCheck service. The service could then be called in a variety of ways - soap, rpc, http request.
If this makes sense so far then my question is with regards to the dependencies between the service and rpc client:
public interface SecurityCheckService {
public SecurityCheckResults check(String name);
}
public class SecurityCheckResults {
private Date instant;
private int score;
//getter & setters
}
public class RpcClient {
private SecurityCheckService remoteService;
public boolean check(int personId) {
String name = "Person" + personId;
int score = remoteService.check(name).getScore();
return score > 10;
}
}
Should there be 3 seperate projects, where the SecurityCheckService
project and the RpcClient
project depend on SecurityCheckResults
project?