this.rolePlayer = rolePlayer;
}
public boolean checkHeader(SOAPHeaderBlock header) {
String role = header.getRole();
SOAPVersion version = header.getVersion();
// 1. If role is ultimatedest, go by what the rolePlayer says
if (role == null || role.equals("") ||
(version instanceof SOAP12Version &&
role.equals(SOAP12Constants.SOAP_ROLE_ULTIMATE_RECEIVER))) {
return (rolePlayer == null || rolePlayer.isUltimateDestination());
}
// 2. If role is next, always return true
if (role.equals(version.getNextRoleURI())) return true;
// 3. If role is none, always return false
if (version instanceof SOAP12Version &&
role.equals(SOAP12Constants.SOAP_ROLE_NONE)) {
return false;