private void checkConsistency() throws Exception {
    log.trace("checkConsistency()");
    try {
      SoapUtils.checkConsistency(requestSoap, response.getSoap());
    } catch (CodedException e) {
      log.error("Inconsistent request-response", e);
      // The error code includes ServiceFailed because it indicates
      // faulty response from service (problem on the other side).
      throw new CodedException(
              X_INCONSISTENT_RESPONSE, "Response from server proxy is not consistent with request")
          .withPrefix(X_SERVICE_FAILED_X);
    }

    checkRequestHash();
  }