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

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


        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        org.apache.tuscany.sca.core.FactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(registry);
        WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
        XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
        DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
        JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory(registry);
        JavaInterfaceContract javaIC = factory.createJavaInterfaceContract();

        JavaInterface iface = factory.createJavaInterface(JaxbIface.class);
       
        DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(registry);
        JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
        new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface);
        new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface);
View Full Code Here


public class Interface2WSDLGeneratorTestCase {

    @Test
    public void testGenerate() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        JavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterface iface = iFactory.createJavaInterface(TestJavaInterface.class);
        DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(new DefaultExtensionPointRegistry());
        JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
        new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface);
        new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface);
        DefaultFactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(registry);
View Full Code Here

    private JavaImplementationFactory javaImplementationFactory;

    @Before
    public void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
        javaImplementationFactory = new DefaultJavaImplementationFactory();
    }
View Full Code Here

    private JavaImplementationFactory javaImplementationFactory;

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

     * Test method for
     * {@link org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSAsyncInterfaceProcessor#visitInterface(JavaInterface)}.
     */
    @Test
    public final void testProcessor() throws Exception {
        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterface contract = iFactory.createJavaInterface(StockQuote.class);
       
        assertTrue(contract.isRemotable());
       
        Assert.assertEquals(1,contract.getOperations().size());
       
View Full Code Here

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

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

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

    @Before
    public void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory();
        type = javaImplementationFactory.createJavaImplementation();
        processor = new ReferenceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
    }
View Full Code Here

    }

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

        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        org.apache.tuscany.sca.core.FactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(registry);
        WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
        XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
        DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
        JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory(registry);
        JavaInterfaceContract javaIC = factory.createJavaInterfaceContract();
        JavaInterface iface = factory.createJavaInterface(HelloWorld.class);
        DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(registry);
        JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
        new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface);
        new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface);
        javaIC.setInterface(iface);
        WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
        assertNotNull(wsdlIC);
        WSDLInterface wsdlInterface = (WSDLInterface)wsdlIC.getInterface();
        assertNotNull(wsdlInterface);
        assertEquals(1, wsdlInterface.getOperations().size());
        assertEquals("sayHello", wsdlInterface.getOperations().get(0).getName());
        assertNotNull(wsdlInterface.getPortType());
        JavaInterfaceContract javaIC2 = factory.createJavaInterfaceContract();
        JavaInterface iface2 = factory.createJavaInterface(TestJavaInterface.class);
        new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface2);
        new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface2);
        javaIC2.setInterface(iface2);
        BindingWSDLGenerator.printWSDL = true;
        WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
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.