Source:
<code>public AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest msg, AssertionType assertion) { LOG.debug("Begin respondingGatewayCrossGatewayQuery"); AdhocQueryResponse response = null; String url; try { url = getEndPointFromConnectionManagerByAdapterAPILevel(assertion, NhincConstants.ADAPTER_DOC_QUERY_SERVICE_NAME); if (NullChecker.isNotNullish(url)) { LOG.debug("getEndPointFromConnectionManagerByAdapterAPILevel:" + url); if (msg == null) { throw new IllegalArgumentException("Request Message must be provided"); } else if (assertion == null) { throw new IllegalArgumentException("Assertion must be provided"); } else { RespondingGatewayCrossGatewayQueryRequestType request = new RespondingGatewayCrossGatewayQueryRequestType(); request.setAdhocQueryRequest(msg); request.setAssertion(assertion); ServicePortDescriptor<AdapterDocQueryPortType> portDescriptor = getServicePortDescriptor(NhincConstants.ADAPTER_API_LEVEL.LEVEL_a0); CONNECTClient<AdapterDocQueryPortType> client = CONNECTClientFactory.getInstance() .getCONNECTClientUnsecured(portDescriptor, url, assertion); response = (AdhocQueryResponse) client.invokePort(AdapterDocQueryPortType.class, "respondingGatewayCrossGatewayQuery", request); } } else { <START> LOG.error("Failed to call the web service (" + NhincConstants.ADAPTER_DOC_QUERY_SERVICE_NAME <END> + "). The URL is null."); throw new WebServiceException("Could not determine URL for Doc Query Adapter endpoint"); } } catch (Exception ex) { LOG.error("Error sending Adapter Doc Query Unsecured message: " + ex.getMessage(), ex); throw new ErrorEventException(ex, getAdapterHelper().createErrorResponse(), "Unable to call Doc Query Adapter"); } LOG.debug("End respondingGatewayCrossGatewayQuery"); return response; }</code><technical_language>format {}</technical_language>

Target:
public AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest msg, AssertionType assertion) { LOG.debug("Begin respondingGatewayCrossGatewayQuery"); AdhocQueryResponse response = null; String url; try { url = getEndPointFromConnectionManagerByAdapterAPILevel(assertion, NhincConstants.ADAPTER_DOC_QUERY_SERVICE_NAME); if (NullChecker.isNotNullish(url)) { LOG.debug("getEndPointFromConnectionManagerByAdapterAPILevel: {}", url); if (msg == null) { throw new IllegalArgumentException("Request Message must be provided"); } else if (assertion == null) { throw new IllegalArgumentException("Assertion must be provided"); } else { RespondingGatewayCrossGatewayQueryRequestType request = new RespondingGatewayCrossGatewayQueryRequestType(); request.setAdhocQueryRequest(msg); request.setAssertion(assertion); ServicePortDescriptor<AdapterDocQueryPortType> portDescriptor = getServicePortDescriptor(NhincConstants.ADAPTER_API_LEVEL.LEVEL_a0); CONNECTClient<AdapterDocQueryPortType> client = CONNECTClientFactory.getInstance() .getCONNECTClientUnsecured(portDescriptor, url, assertion); response = (AdhocQueryResponse) client.invokePort(AdapterDocQueryPortType.class, "respondingGatewayCrossGatewayQuery", request); } } else { throw new WebServiceException("Could not determine URL for Doc Query Adapter endpoint"); } } catch (Exception ex) { throw new ErrorEventException(ex, getAdapterHelper().createErrorResponse(), "Unable to call Doc Query Adapter"); } LOG.debug("End respondingGatewayCrossGatewayQuery"); return response; }