/** * Returns an audit dataset instance which corresponds to the given message. * <p> * When no such instance is currently associated with the message, a new one * will be created by means of the corresponding {@link AuditStrategy} * and registered in the message's exchange. * * @param message CXF message currently handled by this interceptor. * @return an audit dataset instance, or <code>null</code> when this instance * could be neither obtained nor created from scratch. */ protected T getAuditDataset(SoapMessage message) { T auditDataset = InterceptorUtils.findContextualProperty(message, DATASET_CONTEXT_KEY); if (auditDataset == null) { auditDataset = getAuditStrategy().createAuditDataset(); if (auditDataset == null) { LOG.warn("Cannot obtain audit dataset instance, NPE is pending"); return null; } message.getExchange().put(DATASET_CONTEXT_KEY, auditDataset); } return auditDataset; }