public PRPAIN201306UV02 PRPAIN201305UV( PRPAIN201305UV02 body, AssertionType assertion, NhinTargetSystemType target) { String url = null; PRPAIN201306UV02 response = new PRPAIN201306UV02(); ProxyPRPAIN201305UVProxyRequestType proxyRequest = new ProxyPRPAIN201305UVProxyRequestType(); try { if (body != null) { proxyRequest.setPRPAIN201305UV02(body); proxyRequest.setAssertion(assertion); proxyRequest.setNhinTargetSystem(target); log.debug("Before target system URL look up."); url = oProxyHelper.getUrlLocalHomeCommunity( NhincConstants.NHINC_PASSTHRU_PATIENT_DISCOVERY_SERVICE_NAME); log.debug( "After target system URL look up. URL for service: " + NhincConstants.NHINC_PASSTHRU_PATIENT_DISCOVERY_SERVICE_NAME + " is: " + url); if (NullChecker.isNotNullish(url)) { NhincProxyPatientDiscoveryPortType port = getPort( url, NhincConstants.PATIENT_DISCOVERY_ACTION, WS_ADDRESSING_ACTION, assertion); response = (PRPAIN201306UV02) oProxyHelper.invokePort( port, NhincProxyPatientDiscoveryPortType.class, "proxyPRPAIN201305UV", proxyRequest); } else { log.error( "Failed to call the web service (" + NhincConstants.NHINC_PASSTHRU_PATIENT_DISCOVERY_SERVICE_NAME + "). The URL is null."); } } else { log.error( "Failed to call the web service (" + NhincConstants.NHINC_PASSTHRU_PATIENT_DISCOVERY_SERVICE_NAME + "). The input parameter is null."); } } catch (Exception e) { log.error( "Failed to call the web service (" + NhincConstants.NHINC_PASSTHRU_PATIENT_DISCOVERY_SERVICE_NAME + "). An unexpected exception occurred. " + "Exception: " + e.getMessage(), e); response = new HL7PRPA201306Transforms() .createPRPA201306ForErrors( proxyRequest.getPRPAIN201305UV02(), NhincConstants.PATIENT_DISCOVERY_ANSWER_NOT_AVAIL_ERR_CODE); } return response; }