Package org.switchyard.component.common.knowledge.service

Examples of org.switchyard.component.common.knowledge.service.SwitchYardServiceResponse


        if (serviceName != null && _componentName != null) {
            serviceName = ComponentNames.qualify(_componentName, ComponentNames.unqualify(serviceName));
        }
        String operationName = getOperationName(parameters);
        SwitchYardServiceRequest request = new SwitchYardServiceRequest(serviceName, operationName, content);
        SwitchYardServiceResponse response = getInvoker().invoke(request);
        // results (output)
        Map<String, Object> results = workItem.getResults();
        String resultName = getResultName(parameters);
        if (!response.hasFault()) {
            // result (success)
            if (resultName != null) {
                Object result = response.getContent();
                results.put(resultName, result);
            }
            manager.completeWorkItem(workItem.getId(), results);
        } else {
            // fault (failure)
            String fmsg = response.getFaultMessage();
            response.logFaultMessage(fmsg);
            Object fault = response.getFault();
            String faultName = getFaultName(parameters);
            if (faultName != null) {
                results.put(faultName, fault);
            }
            String faultEventId = getFaultEventId(parameters);
View Full Code Here

TOP

Related Classes of org.switchyard.component.common.knowledge.service.SwitchYardServiceResponse

Copyright © 2018 www.massapicom. 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.