Examples of IDispatcher


Examples of org.intalio.tempo.workflow.fds.dispatches.IDispatcher

//        sr.write(document);
//        sr.flush();
//    }

    public void testNotifyDispatcher() throws Exception {
        IDispatcher dispatcher = Dispatchers.createDispatcher("notifyRequest");

        Document request = createRequest();
        dispatcher.dispatchRequest(request);
        Document response = createResponse();
        dispatcher.dispatchResponse(response);
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.fds.dispatches.IDispatcher

                Document pureRequest = SoapTools.unwrapMessage(userProcessRequest);
                Element rootElement = pureRequest.getRootElement();
                String rootElementName = rootElement.getName();

                IDispatcher dispatcher = null;
                try {
                    dispatcher = Dispatchers.createDispatcher(rootElementName);
                } catch (NoDispatcherException e) {
                    _log.debug("No custom dispatcher, using the default processing");
                }

                if (dispatcher != null) {
                    // TODO: convert the default processing to an IDispatcher
                    try {
                        Document processedRequest = dispatcher.dispatchRequest(pureRequest);
                        Document wrappedRequest = SoapTools.wrapMessage(processedRequest);
                        String endpoint = dispatcher.getTargetEndpoint();
                        String dispatcherSoapAction = dispatcher.getTargetSoapAction();
                        Document rawResponse = messageSender.requestAndGetReply(wrappedRequest, endpoint, dispatcherSoapAction);

                        Document unwrappedResponse = SoapTools.unwrapMessage(rawResponse);
                        Document processedResponse = dispatcher.dispatchResponse(unwrappedResponse);
                        responseDocument = SoapTools.wrapMessage(processedResponse);
                    } catch (InvalidInputFormatException e) {
                        _log.error("Error converting user process request", e);
                        // TODO: return a SOAP fault
                        throw new RuntimeException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.