Package org.codehaus.xfire.aegis.type

Examples of org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry


       
        addNamespace("t", "urn:test");
        addNamespace("xsd", SoapConstants.XSD);
        addNamespace("xsi", SoapConstants.XSI_NS);
       
        TypeMappingRegistry reg = new DefaultTypeMappingRegistry(true);
        mapping = reg.createTypeMapping(true);
    }
View Full Code Here


    public void setUp() throws Exception
    {
        super.setUp();
       
        DefaultTypeMappingRegistry registry = new DefaultTypeMappingRegistry(true);
        TypeMapping defaultTM = registry.getDefaultTypeMapping();
       
        tm = new CustomTypeMapping(defaultTM);
        creator = new XMLTypeCreator();
        creator.setConfiguration(new Configuration());
        DefaultTypeCreator next = new DefaultTypeCreator();
View Full Code Here

    protected void setUp()
        throws Exception
    {
        super.setUp();

        DefaultTypeMappingRegistry reg = new DefaultTypeMappingRegistry();
        config = reg.getConfiguration();
        XMLTypeCreator creator = new XMLTypeCreator();
        creator.setConfiguration(reg.getConfiguration());
        DefaultTypeCreator next = new DefaultTypeCreator();
        next.setConfiguration(reg.getConfiguration());
        creator.setNextCreator(next);
        reg.createDefaultMappings();
        tm = (CustomTypeMapping) reg.getDefaultTypeMapping();
        tm.setTypeCreator(creator);
    }
View Full Code Here

       
        addNamespace("t", "urn:test");
        addNamespace("xsd", SoapConstants.XSD);
        addNamespace("xsi", SoapConstants.XSI_NS);
       
        TypeMappingRegistry reg = new DefaultTypeMappingRegistry(true);
        mapping = reg.createTypeMapping(true);
        mapping.setEncodingStyleURI("urn:test");
    }
View Full Code Here

    {
        // XMLOutputFactory ofactory = XMLOutputFactory.newInstance();
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        // XMLStreamWriter writer = ofactory.createXMLStreamWriter(bos);
        XMLStreamWriter writer = STAXUtils.createXMLStreamWriter(bos, null, null);
        TypeMappingRegistry tmr = new DefaultTypeMappingRegistry(true);
        TypeMapping tm = tmr.createTypeMapping(true);

        SimpleBean bean = new SimpleBean();
        bean.setBleh("bleh");
        bean.setHowdy("howdy");
View Full Code Here

    {
        // XMLOutputFactory ofactory = XMLOutputFactory.newInstance();
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        // XMLStreamWriter writer = ofactory.createXMLStreamWriter(bos);
        XMLStreamWriter writer = STAXUtils.createXMLStreamWriter(bos, null, null);
        TypeMappingRegistry tmr = new DefaultTypeMappingRegistry(true);
        TypeMapping tm = tmr.createTypeMapping(true);

        registerSimpleBeanType(tm);
        registerArrayType(tm);

        SimpleBean bean = new SimpleBean();
View Full Code Here

       
        addNamespace("t", "urn:test");
        addNamespace("xsd", SoapConstants.XSD);
        addNamespace("xsi", SoapConstants.XSI_NS);
       
        TypeMappingRegistry reg = new DefaultTypeMappingRegistry(true);
        mapping = reg.createTypeMapping(true);
    }
View Full Code Here

    protected void setUp()
        throws Exception
    {
        super.setUp();

        reg = new DefaultTypeMappingRegistry(true);
        tm = (CustomTypeMapping) reg.getDefaultTypeMapping();
       
        XMLTypeCreator creator = new XMLTypeCreator();
        creator.setConfiguration(reg.getConfiguration());
        DefaultTypeCreator next = new DefaultTypeCreator();
View Full Code Here

    public void testSimpleXMLMapping() throws Exception
    {
        XMLTypeCreator creator = new XMLTypeCreator();
        creator.setNextCreator(new DefaultTypeCreator());
        creator.setConfiguration(new Configuration());
        tm = new CustomTypeMapping(new DefaultTypeMappingRegistry().createDefaultMappings());
        creator.setTypeMapping(tm);
        Type type = creator.createType(MyService1.class.getDeclaredMethod("getCollection", new Class[0]), -1);
        assertTrue("type is not a collection", type instanceof CollectionType);
        assertEquals("unexpected collection type", Double.class, ((CollectionType)type).getComponentType().getTypeClass());
        try
View Full Code Here

    public void testBestMatch() throws Exception
    {
        XMLTypeCreator creator = new XMLTypeCreator();
        creator.setNextCreator(new DefaultTypeCreator());
        creator.setConfiguration(new Configuration());
        tm = new CustomTypeMapping(new DefaultTypeMappingRegistry().createDefaultMappings());
        creator.setTypeMapping(tm);
        Method method = MyService1.class.getDeclaredMethod("getCollection", new Class[0]);
        Type type = creator.createType(method, -1);
        assertTrue("type is not a collection", type instanceof CollectionType);
        assertEquals("unexpected collection return type for method " + method, Double.class, ((CollectionType)type).getComponentType().getTypeClass());
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry

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.