Source:
<code>public AcknowledgementType auditLog(LogEventRequestType request, AssertionType assertion) { LOG.debug("Entering AuditRepositoryProxyWebServiceSecured.auditLog(...)"); if (request.getAuditMessage() == null) { LOG.error("Audit Request Message is null"); synchronized (result) { return result; } } else { secureRequest.setAuditMessage(request.getAuditMessage()); } secureRequest.setDirection(request.getDirection()); secureRequest.setRemoteHCID(request.getRemoteHCID()); secureRequest.setEventType(request.getEventType()); secureRequest.setEventID(request.getEventID()); secureRequest.setEventOutcomeIndicator(request.getEventOutcomeIndicator()); secureRequest.setEventTimestamp(request.getEventTimestamp()); secureRequest.setUserId(request.getUserId()); secureRequest.setRelatesTo(request.getRelatesTo()); <START> secureRequest.setRequestMessageId(request.getRequestMessageId()); <END> try { String url = oProxyHelper.getUrlLocalHomeCommunity(NhincConstants.AUDIT_REPO_SECURE_SERVICE_NAME); if (NullChecker.isNotNullish(url)) { ServicePortDescriptor<AuditRepositoryManagerSecuredPortType> portDescriptor = new AuditRepositorySecuredServicePortDescriptor(); CONNECTClient<AuditRepositoryManagerSecuredPortType> client = CONNECTCXFClientFactory.getInstance() .getCONNECTClientSecured(portDescriptor, url, assertion); synchronized (result) { result = (AcknowledgementType) client.invokePort(AuditRepositoryManagerSecuredPortType.class, invokeMethodName, secureRequest); } } } catch (Exception e) { LOG.error("Failed to call the web service (" + NhincConstants.AUDIT_REPO_SECURE_SERVICE_NAME + "). An unexpected exception occurred. " + "Exception: " + e.getLocalizedMessage(), e); } LOG.debug("In AuditRepositoryProxyWebServiceSecured.auditLog(...) - completed called to ConnectionManager to " + "retrieve endpoint."); return result; }</code><technical_language>This secureRequest built in a separate method passing assertion</technical_language>

Target:
public AcknowledgementType auditLog(LogEventRequestType request, AssertionType assertion) { LOG.debug("Entering AuditRepositoryProxyWebServiceSecured.auditLog(...)"); if (request.getAuditMessage() == null) { LOG.error("Audit Request Message is null"); synchronized (result) { return result; } } try { String url = oProxyHelper.getUrlLocalHomeCommunity(NhincConstants.AUDIT_REPO_SECURE_SERVICE_NAME); if (NullChecker.isNotNullish(url)) { ServicePortDescriptor<AuditRepositoryManagerSecuredPortType> portDescriptor = new AuditRepositorySecuredServicePortDescriptor(); CONNECTClient<AuditRepositoryManagerSecuredPortType> client = CONNECTCXFClientFactory.getInstance() .getCONNECTClientSecured(portDescriptor, url, assertion); synchronized (result) { result = (AcknowledgementType) client.invokePort(AuditRepositoryManagerSecuredPortType.class, invokeMethodName, createLogSecureEventRequestType(request)); } } } catch (Exception e) { LOG.error("Failed to call the web service (" + NhincConstants.AUDIT_REPO_SECURE_SERVICE_NAME + "). An unexpected exception occurred. " + "Exception: " + e.getLocalizedMessage(), e); } LOG.debug("In AuditRepositoryProxyWebServiceSecured.auditLog(...) - completed called to ConnectionManager to " + "retrieve endpoint."); return result; }