Package org.apache.tuscany.sca.interfacedef.java

Examples of org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory


    }

    @Before
    public void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        factory = new DefaultJavaInterfaceFactory(registry);
        // policyProcessor = new PolicyJavaInterfaceVisitor(registry);
    }
View Full Code Here


     */
    @Test
    public void testDuplicateOpeartionOnRemotableInterface()
    {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterfaceIntrospectorImpl introspector = new JavaInterfaceIntrospectorImpl(javaFactory);
        JavaInterfaceImpl javaInterface = new JavaInterfaceImpl();

        try {
            introspector.introspectInterface(javaInterface, DuplicateMethodOnRemotableInterface.class);
View Full Code Here

        // interfaceProcessor = new JAXWSJavaInterfaceProcessor(db, new JAXWSFaultExceptionMapper(db, xa), xa);
    }

    @Test
    public void testWrapper() throws Exception {
        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterface contract = iFactory.createJavaInterface(StockExceptionTest.class);

        // interfaceProcessor.visitInterface(contract);
        Operation op = contract.getOperations().get(0);
        Assert.assertTrue(!op.isInputWrapperStyle());
        Assert.assertEquals(new QName("http://www.example.com/stock", "stockQuoteOffer"), op.getInputWrapper().getWrapperElement().getQName());
View Full Code Here

     * Test method for
     * {@link org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor#visitInterface(JavaInterface)}.
     */
    @Test
    public final void testProcessor() throws Exception {
        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterface contract = iFactory.createJavaInterface(WebServiceInterfaceWithoutAnnotation.class);

        // interfaceProcessor.visitInterface(contract);
        assertFalse(contract.isRemotable());

        contract = iFactory.createJavaInterface(WebServiceInterfaceWithAnnotation.class);
        // interfaceProcessor.visitInterface(contract);
        assertTrue(contract.isRemotable());

        Operation op1 = contract.getOperations().get(0);
        Operation op2 = contract.getOperations().get(1);
View Full Code Here

    private org.apache.tuscany.sca.implementation.java.introspect.impl.HeuristicPojoProcessor processor;
    private JavaImplementationFactory javaImplementationFactory;

    public HeuristicPojoProcessorTestCase() {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        processor = new HeuristicPojoProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
        javaImplementationFactory = new DefaultJavaImplementationFactory();
    }
View Full Code Here

        Constructor<Mixed> ctor1 = Mixed.class.getConstructor(String.class, String.class, String.class);
        processor.visitConstructor(ctor1, type);

        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory(registry);
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
        ReferenceProcessor referenceProcessor = new ReferenceProcessor(assemblyFactory, javaFactory);
        PropertyProcessor propertyProcessor = new PropertyProcessor(registry);
        JavaParameterImpl[] parameters = type.getConstructor().getParameters();
        for (int i = 0; i < parameters.length; i++) {
            referenceProcessor.visitConstructorParameter(parameters[i], type);
View Full Code Here

                                                                    Set.class,
                                                                    String[].class);
        processor.visitConstructor(ctor1, type);
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
        ReferenceProcessor referenceProcessor = new ReferenceProcessor(assemblyFactory, javaFactory);
        PropertyProcessor propertyProcessor = new PropertyProcessor(registry);
        JavaParameterImpl[] parameters = type.getConstructor().getParameters();
        for (int i = 0; i < parameters.length; i++) {
            referenceProcessor.visitConstructorParameter(parameters[i], type);
View Full Code Here


    protected AbstractProcessorTest() {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        factory = new DefaultAssemblyFactory(registry);
        javaFactory = new DefaultJavaInterfaceFactory(registry);
        referenceProcessor = new ReferenceProcessor(factory, javaFactory);
        propertyProcessor = new PropertyProcessor(registry);
        resourceProcessor = new ResourceProcessor(factory);
        constructorProcessor = new ConstructorProcessor(factory);
        referenceProcessor = new ReferenceProcessor(factory, javaFactory);
View Full Code Here

    }

    @Before
    public void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        serviceProcessor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
        policyProcessor = new PolicyProcessor(registry);
        visitor = new PolicyJavaInterfaceVisitor(registry);
        JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory();
        type = javaImplementationFactory.createJavaImplementation();
    }
View Full Code Here

        registry = new DefaultExtensionPointRegistry();
    }

    @Test
    public final void testProcessor() throws Exception {
        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterface contract = iFactory.createJavaInterface(Bean.class);
       
        assertTrue(contract.isRemotable());
       
        Assert.assertEquals(1,contract.getOperations().size());
       
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory

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.