Source:
protected AuditMessageType.ActiveParticipant getActiveParticipantDestination(NhinTargetSystemType target, boolean isRequesting, Properties webContextProperties, String serviceName) { String url; String ipOrHost; AuditMessageType.ActiveParticipant participant = new AuditMessageType.ActiveParticipant(); url = isRequesting ? getWebServiceUrlFromRemoteObject(getLocalHCIDNhinTarget(), NhincConstants.NHINC_XDR_RESPONSE_SERVICE_NAME) : getWebServiceUrlFromRemoteObject( convertToNhinTarget(getMessageCommunityId(getAssertion(), target, isRequesting)), NhincConstants.NHINC_XDR_RESPONSE_SERVICE_NAME); if (url != null) { try { participant.setUserID(url); ipOrHost = new URL(url).getHost(); participant.setNetworkAccessPointID(ipOrHost); participant.setNetworkAccessPointTypeCode(getNetworkAccessPointTypeCode(ipOrHost)); } catch (MalformedURLException ex) { LOG.error("Couldn't parse the given NetworkAccessPointID as a URL: " + ex.getLocalizedMessage(), ex); participant.setUserID(AuditTransformsConstants.ACTIVE_PARTICIPANT_USER_ID_SOURCE); participant.setNetworkAccessPointTypeCode(AuditTransformsConstants.NETWORK_ACCESSOR_PT_TYPE_CODE_NAME); participant.setNetworkAccessPointID(AuditTransformsConstants.ACTIVE_PARTICIPANT_UNKNOWN_IP_ADDRESS); } } if (!isRequesting) { participant.setAlternativeUserID(ManagementFactory.getRuntimeMXBean().getName()); } participant.setUserIsRequestor(Boolean.FALSE); participant.getRoleIDCode().add(AuditDataTransformHelper.createCodeValueType( AuditTransformsConstants.ACTIVE_PARTICIPANT_ROLE_CODE_DEST, null, AuditTransformsConstants.ACTIVE_PARTICIPANT_CODE_SYSTEM_NAME, AuditTransformsConstants.ACTIVE_PARTICIPANT_ROLE_CODE_DESTINATION_DISPLAY_NAME)); return participant; }

Target:
protected AuditMessageType.ActiveParticipant getActiveParticipantDestination(NhinTargetSystemType target, boolean isRequesting, Properties webContextProperties, String serviceName) { String ipOrHost; AuditMessageType.ActiveParticipant participant = new AuditMessageType.ActiveParticipant(); String url = isRequesting ? getWebServiceUrlFromRemoteObject(getLocalHCIDNhinTarget(), NhincConstants.NHINC_XDR_RESPONSE_SERVICE_NAME) : getWebServiceUrlFromRemoteObject( convertToNhinTarget(getMessageCommunityId(getAssertion(), target, isRequesting)), NhincConstants.NHINC_XDR_RESPONSE_SERVICE_NAME); try { participant.setUserID(url); ipOrHost = new URL(url).getHost(); participant.setNetworkAccessPointID(ipOrHost); participant.setNetworkAccessPointTypeCode(getNetworkAccessPointTypeCode(ipOrHost)); } catch (MalformedURLException ex) { LOG.error("Couldn't parse the given NetworkAccessPointID as a URL: " + ex.getLocalizedMessage(), ex); participant.setUserID(AuditTransformsConstants.ACTIVE_PARTICIPANT_USER_ID_SOURCE); participant.setNetworkAccessPointTypeCode(AuditTransformsConstants.NETWORK_ACCESSOR_PT_TYPE_CODE_NAME); participant.setNetworkAccessPointID(AuditTransformsConstants.ACTIVE_PARTICIPANT_UNKNOWN_IP_ADDRESS); } if (!isRequesting) { participant.setAlternativeUserID(ManagementFactory.getRuntimeMXBean().getName()); } participant.setUserIsRequestor(Boolean.FALSE); participant.getRoleIDCode().add(AuditDataTransformHelper.createCodeValueType( AuditTransformsConstants.ACTIVE_PARTICIPANT_ROLE_CODE_DEST, null, AuditTransformsConstants.ACTIVE_PARTICIPANT_CODE_SYSTEM_NAME, AuditTransformsConstants.ACTIVE_PARTICIPANT_ROLE_CODE_DESTINATION_DISPLAY_NAME)); return participant; }