NhinDocSubmissionDeferredResponseProxyWebServiceSecuredImpl implements
NhinDocSubmissionDeferredResponseProxy { @Override @NwhinInvocationEvent(beforeBuilder = DeferredResponseDescriptionBuilder.class, afterReturningBuilder = DeferredResponseDescriptionBuilder.class, serviceType = "Document Submission Deferred Response", version = "2.0") public RegistryResponseType provideAndRegisterDocumentSetBDeferredResponse20(RegistryResponseType request, AssertionType assertion, NhinTargetSystemType target) { LOG.debug("Begin provideAndRegisterDocumentSetBDeferredResponse"); RegistryResponseType response = null; try { String url = getUrl(target); if (request == null) { throw new IllegalArgumentException("Request Message must be provided"); } else { Holder<RegistryResponseType> respHolder = new Holder<>(); respHolder.value = request; ServicePortDescriptor<XDRDeferredResponse20PortType> portDescriptor = new NhinDocSubmissionDeferredResponseServicePortDescriptor(); CONNECTClient<XDRDeferredResponse20PortType> client = getCONNECTClientSecured(portDescriptor, url, assertion, target, NhincConstants.NHINC_XDR_RESPONSE_SERVICE_NAME); client.enableMtom(); client.invokePort(XDRDeferredResponse20PortType.class, "provideAndRegisterDocumentSetBDeferredResponse", respHolder); response = respHolder.value; } } catch (Exception ex) { response = getMessageGeneratorUtils().createRegistryErrorResponse(ex.getMessage(), "XDSRegistryError", NhincConstants.XDR_ACK_FAILURE_STATUS_MSG); throw new ErrorEventException(ex, response, "Unable to call Nhin Doc Submission Deferred Response"); } LOG.debug("End provideAndRegisterDocumentSetBDeferredResponse"); return response; } NhinDocSubmissionDeferredResponseProxyWebServiceSecuredImpl(); @Override @NwhinInvocationEvent(beforeBuilder = DeferredResponseDescriptionBuilder.class, afterReturningBuilder = DeferredResponseDescriptionBuilder.class, serviceType = "Document Submission Deferred Response", version = "2.0") RegistryResponseType provideAndRegisterDocumentSetBDeferredResponse20(RegistryResponseType request,
        AssertionType assertion, NhinTargetSystemType target);  }
@Test public void testMtom() { NhinDocSubmissionDeferredResponseProxyWebServiceSecuredImpl impl = getImpl(); impl.provideAndRegisterDocumentSetBDeferredResponse20(request, assertion, getTarget("1.1")); verify(client).enableMtom(); }