Package org.apache.tuscany.sca.core

Examples of org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint


@Ignore("Fails presently due to a bug in the generated wsdl where the Class2 type is in the wrong namespace")
public class JAXBWSDLGeneratorTestCase extends TestCase {

    public void testCreateWSDLInterfaceContract() throws InvalidInterfaceException, IncompatibleInterfaceContractException {
        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);
       
View Full Code Here


        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);
        WSDLFactory wFactory = new DefaultWSDLFactory(registry);
        DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
        WSDLDefinition wsdlDefinition = wFactory.createWSDLDefinition();
        XSDFactory factory = new DefaultXSDFactory();
        Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null), dataBindings, factory, documentBuilderFactory, null);
        Definition definition = generator.generate(iface, wsdlDefinition);
View Full Code Here

    public void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ModelResolverExtensionPoint resolvers = new DefaultModelResolverExtensionPoint(registry);
        resolvers.addResolver(Model.class, TestModelResolver.class);
        context = new ProcessorContext();
        FactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);

        resolver = new ExtensibleModelResolver(null, resolvers, factories);

        factory = new DefaultContributionFactory();
    }
View Full Code Here

    }

    @Test
    public void testLoad() throws Exception {
        BluePrintComponentsProcessor processor =
            new BluePrintComponentsProcessor(new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry()));
        ComponentType ct = processor.read(reader, new ProcessorContext());
        Assert.assertEquals(1, ct.getServices().size());
        Assert.assertEquals(4, ct.getReferences().size());
    }
View Full Code Here

*/
public class BindingWSDLGeneratorTestCase extends TestCase {

    public void testCreateWSDLInterfaceContract() throws InvalidInterfaceException {
        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);
View Full Code Here

    @Test
    public void testLoad() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        OSGiComponentProcessor processor =
            new OSGiComponentProcessor(new DefaultFactoryExtensionPoint(registry));
        ComponentType ct = processor.read(reader, new ProcessorContext(registry));
        Assert.assertEquals(1, ct.getServices().size());
        Assert.assertEquals(4, ct.getReferences().size());
    }
View Full Code Here

    public void testReadImplementation() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry, new HashMap<String, String>());
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
        factories.addFactory(validatingInputFactory);

        CompositeDocumentProcessor compositeDocumentProcessor =
            new CompositeDocumentProcessor(factories, staxProcessor);

        URL url = getClass().getResource("Calculator.composite");
View Full Code Here

        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry, new HashMap<String, String>());
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
        factories.addFactory(validatingInputFactory);
        CompositeDocumentProcessor compositeDocumentProcessor =
            new CompositeDocumentProcessor(factories, staxProcessor);

        URL url = getClass().getResource("RMIBindingTest.composite");
        URI uri = URI.create("RMIBindingTest.composite");
View Full Code Here

    @BeforeClass
    public static void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        context = new ProcessorContext(registry);

        factories = new DefaultFactoryExtensionPoint(registry);
        StAXArtifactProcessorExtensionPoint processors =
            registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        processor = processors.getProcessor(NodeConfiguration.class);
    }
View Full Code Here

    public void setUp() throws Exception {

        ModelResolverExtensionPoint resolvers = new DefaultModelResolverExtensionPoint();
        resolvers.addResolver(Model.class, TestModelResolver.class);

        FactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry());

        resolver = new ExtensibleModelResolver(null, resolvers, factories, null);

        factory = new DefaultContributionFactory();
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint

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.