Examples of InOutOperation


Examples of org.switchyard.metadata.InOutOperation

            tempEl = XMLHelper.getNextSiblingElement(tempEl);
        }
        if (outputType == null) {
            return new InOnlyOperation(opEl.getAttribute(ATTR_NAME), inputType);
        } else {
            return new InOutOperation(opEl.getAttribute(ATTR_NAME), inputType, outputType, faultType);
        }
    }
View Full Code Here

Examples of org.switchyard.metadata.InOutOperation

    }
   
    private ServiceReference registerInOutServiceWithTypes(
            String serviceName, QName inputType, QName outputType, ExchangeHandler handler) {
       
        InOutService intf = new InOutService(new InOutOperation("process", inputType, outputType));
        ServiceReferenceImpl reference = new ServiceReferenceImpl(
                new QName(serviceName),  intf, _domain, null);
        _domain.registerService(new QName(serviceName),  intf, handler);
        reference.setDispatcher(_provider.createDispatcher(reference));
        return reference;
View Full Code Here

Examples of org.switchyard.metadata.InOutOperation

                Message fault = exchange.createMessage();
                fault.setContent(new Exception("testFaultTransformSequence"));
                exchange.sendFault(fault);
            }
        };
        InOutOperation providerContract = new InOutOperation("faultOp",
                JavaTypes.toMessageType(String.class),   // input
                JavaTypes.toMessageType(String.class),   // output
                JavaTypes.toMessageType(Exception.class))// fault
        InOutOperation consumerContract = new InOutOperation("faultOp",
                JavaTypes.toMessageType(String.class),   // input
                JavaTypes.toMessageType(String.class),   // output
                JavaTypes.toMessageType(String.class))// fault
        _domain.registerService(serviceName, new InOutService(providerContract), provider);
        _domain.getTransformerRegistry().addTransformer(new ExceptionToStringTransformer());
View Full Code Here

Examples of org.switchyard.metadata.InOutOperation

    public void testCreateExchange() {
        Exchange inOnly = _inOnlyReference.createExchange();
        inOnly.consumer(null, new InOnlyOperation("foo"));
        Assert.assertEquals(ExchangePattern.IN_ONLY, inOnly.getContract().getConsumerOperation().getExchangePattern());
        Exchange inOut = _inOutReference.createExchange(new MockHandler());
        inOut.consumer(null, new InOutOperation("foo"));
        Assert.assertEquals(ExchangePattern.IN_OUT, inOut.getContract().getConsumerOperation().getExchangePattern());
    }
View Full Code Here

Examples of org.switchyard.metadata.InOutOperation

       
        if (operation == null) {
            if (ExchangePattern.IN_ONLY.equals(pattern)) {
                operation = new InOnlyOperation(_operationName, _inputType);
            } else {
                operation = new InOutOperation(_operationName, _inputType, _expectedOutputType, _expectedFaultType);
            }
        }
       
        reference = _domain.registerServiceReference(_serviceName, new BaseService(operation), handler);
        return _operationName == null ? reference.createExchange() : reference.createExchange(_operationName);
View Full Code Here

Examples of org.switchyard.metadata.InOutOperation

                // Create the appropriate service operation and add it to the list
                OperationTypeQNames operationTypeNames = new OperationTypeQNames(m);
                if (m.getReturnType().equals(Void.TYPE)) {
                    ops.add(new InOnlyOperation(m.getName(), operationTypeNames.in()));
                } else {
                    ops.add(new InOutOperation(m.getName(), operationTypeNames.in(), operationTypeNames.out(), operationTypeNames.fault()));
                }
            }
        }
       
        return new JavaService(ops, serviceInterface);
View Full Code Here

Examples of org.switchyard.metadata.InOutOperation

                validateEsbInterface(esbIntf);
                if (esbIntf.getOutputType() == null) {
                    serviceInterface = new InOnlyService(new InOnlyOperation(
                            ServiceInterface.DEFAULT_OPERATION, esbIntf.getInputType()));
                } else {
                    serviceInterface = new InOutService(new InOutOperation(
                            ServiceInterface.DEFAULT_OPERATION,
                            esbIntf.getInputType(), esbIntf.getOutputType(), esbIntf.getFaultType()));
                }
            }
        }
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.