Package org.apache.tuscany.sca.interfacedef.impl

Examples of org.apache.tuscany.sca.interfacedef.impl.OperationImpl


* @version $Rev: 537397 $ $Date: 2007-05-12 17:56:25 +0530 (Sat, 12 May 2007) $
*/
public class InvocationChainImplTestCase extends TestCase {

    public void testInsertAtEnd() throws Exception {
        InvocationChain chain = new InvocationChainImpl(new OperationImpl("foo"));
        Interceptor inter2 = new MockInterceptor();
        Interceptor inter1 = new MockInterceptor();
        chain.addInterceptor(inter1);
        chain.addInterceptor(inter2);
        Interceptor head = (Interceptor)chain.getHeadInvoker();
View Full Code Here


       
        JavaInterface contract = javaFactory.createJavaInterface();
        contract.setJavaClass(MockInterface.class);
        JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
        interfaceContract.setInterface(contract);
        Operation operation = new OperationImpl("call");
        Operation operation1 = new OperationImpl("call1");
        contract.getOperations().add(operation);
        contract.getOperations().add(operation1);
        contract.setRemotable(true);
        processor.visitInterface(contract);
        // Assert.assertEquals("org.w3c.dom.Node", contract.getDataBinding());
View Full Code Here

     * @throws NotSupportedWSDLException
     */
    public Operation getOperation() throws InvalidInterfaceException {
        if (operationModel == null) {
            boolean oneway = (operation.getOutput() == null);
            operationModel = new OperationImpl();
            operationModel.setName(operation.getName());
            operationModel.setFaultTypes(getFaultTypes());
            operationModel.setNonBlocking(oneway);
            operationModel.setConversationSequence(ConversationSequence.CONVERSATION_NONE);
            operationModel.setInputType(getInputType());
View Full Code Here

                        policyProcessor.readPolicies(callback, reader);

                    } else if (OPERATION_QNAME.equals(name)) {

                        // Read an <operation>
                        Operation operation = new OperationImpl();
                        operation.setName(getString(reader, NAME));
                        operation.setUnresolved(true);
                        if (callback != null) {
                            policyProcessor.readPolicies(callback, operation, reader);
                        } else {
                            policyProcessor.readPolicies(contract, operation, reader);
                        }
View Full Code Here

                        policyProcessor.readPolicies(abstractProperty, reader);
                       
                    } else if (OPERATION_QNAME.equals(name)) {

                        // Read an <operation>
                        Operation operation = new OperationImpl();
                        operation.setName(getString(reader, NAME));
                        operation.setUnresolved(true);
                        policyProcessor.readPolicies(abstractContract, operation, reader);
                       
                    } else {

                        // Read an extension element
View Full Code Here

        @DataBinding("xml:string")
        String call1(String msg);
    }

    private static Operation newOperation(String name) {
        Operation operation = new OperationImpl();
        operation.setName(name);
        return operation;
    }
View Full Code Here

        this.handler = new JAXBWrapperHandler();
    }

    public void testCreate() {
        ElementInfo element = new ElementInfo(ELEMENT, null);
        Operation op = new OperationImpl();
        WrapperInfo wrapperInfo = new WrapperInfo(JAXBDataBinding.NAME, element, null, null, null);
        wrapperInfo.setInputWrapperType(new DataTypeImpl<XMLType>(JAXBDataBinding.NAME, StockQuoteOffer.class,
                                                                  XMLType.UNKNOWN));
        op.setWrapper(wrapperInfo);
        Object offer = handler.create(op, true);
        Assert.assertTrue(offer instanceof StockQuoteOffer);
    }
View Full Code Here

        StockQuoteOffer wrapper = new StockQuoteOffer();
        wrapper.setInput("IBM");
        List<ElementInfo> elements = new ArrayList<ElementInfo>();
        elements.add(new ElementInfo(INPUT, null));
        WrapperInfo wrapperInfo = new WrapperInfo(JAXBDataBinding.NAME, null, null, elements, null);
        Operation op = new OperationImpl();
        op.setWrapper(wrapperInfo);
        List children = handler.getChildren(wrapper, op, true);
        assertNotNull(children);
        assertEquals(1, children.size());
        assertEquals("IBM", children.get(0));
    }
View Full Code Here

    public Wire createWire() {
        return new WireImpl();
    }

    public Operation createOperation() {
        return new OperationImpl();
    }
View Full Code Here

    }

    public void testWrapperAnyType() throws Exception {
        XMLHelper xmlHelper = context.getXMLHelper();
        XMLDocument document = xmlHelper.load(getClass().getResourceAsStream("/wrapper.xml"));
        Operation op = new OperationImpl();
        List children = handler.getChildren(document, op, true);
        assertEquals(5, children.size());
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.impl.OperationImpl

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.