Examples of BeanType


Examples of org.apache.cxf.aegis.type.basic.BeanType

        assertEquals("attProp", q.getLocalPart());
    }

    @Test
    public void testExtensibilityOff() {
        BeanType type = (BeanType)tm.getTypeCreator().createType(AnnotatedBean4.class);

        assertFalse(type.getTypeInfo().isExtensibleElements());
        assertFalse(type.getTypeInfo().isExtensibleAttributes());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

        assertFalse(type.getTypeInfo().isExtensibleAttributes());
    }

    @Test
    public void testNillableAndMinOccurs() {
        BeanType type = (BeanType)tm.getTypeCreator().createType(AnnotatedBean4.class);
        AnnotatedTypeInfo info = (AnnotatedTypeInfo)type.getTypeInfo();
        Iterator elements = info.getElements().iterator();
        assertTrue(elements.hasNext());
        // nillable first
        QName element = (QName)elements.next();
        if ("minOccursProperty".equals(element.getLocalPart())) {
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

                    wsdl);
    }

    @Test
    public void testGetSetRequired() throws Exception {
        BeanType type = new BeanType(new AnnotatedTypeInfo(tm, BadBean.class, "urn:foo",
                                                           new TypeCreationOptions()));
        type.setSchemaType(new QName("urn:foo", "BadBean"));

        assertFalse(type.getTypeInfo().getElements().iterator().hasNext());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

*/
public class CustomMappingTest extends AbstractAegisTest {
    @Test
    public void testInheritedMapping() throws Exception {
        BeanTypeInfo bti = new BeanTypeInfo(GregorianCalendar.class, "http://util.java");
        BeanType beanType = new BeanType(bti);
        beanType.setSchemaType(new QName("http://util.java{GregorianCalendar}"));
        AegisContext context = new AegisContext();
        context.initialize();
        TypeMapping mapping = context.getTypeMapping();
        // we are replacing the default mapping.
        mapping.register(beanType);
        XmlSchema schema = newXmlSchema("http://util.java");
        beanType.writeSchema(schema);
        // well, test?
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

            AegisDatabinding db = new AegisDatabinding();
            s.setDataBinding(db);
            db.initialize(s);
           
            TypeMapping tm = (TypeMapping) s.get(TypeMapping.class.getName());
            BeanType type = new BeanType();
            type.setSchemaType(new QName("http://org.codehaus.xfire.client", "Book"));
            type.setTypeClass(Book.class);
            type.setTypeMapping(tm);

            System.out.println(type);

            tm.register(type);
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

     * Test if attributeProperty is correctly mapped to attProp by
     * applying the xml mapping file <className>.aegis.xml
     */
    @Test
    public void testAegisType() {
        BeanType type = (BeanType)tm.getTypeCreator().createType(JaxbBean3.class);

        assertEquals(0, type.getTypeInfo().getAttributes().size());

        Iterator itr = type.getTypeInfo().getElements().iterator();
        assertTrue(itr.hasNext());
        QName q = (QName)itr.next();
        assertEquals("attProp", q.getLocalPart());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

        assertEquals("attProp", q.getLocalPart());
    }

    @Test
    public void testExtensibilityOff() {
        BeanType type = (BeanType)tm.getTypeCreator().createType(JaxbBean4.class);

        assertFalse(type.getTypeInfo().isExtensibleElements());
        assertFalse(type.getTypeInfo().isExtensibleAttributes());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

        assertFalse(type.getTypeInfo().isExtensibleAttributes());
    }

    @Test
    public void testNillableAndMinOccurs() {
        BeanType type = (BeanType)tm.getTypeCreator().createType(JaxbBean4.class);
        AnnotatedTypeInfo info = (AnnotatedTypeInfo)type.getTypeInfo();
        Iterator elements = info.getElements().iterator();
        assertTrue(elements.hasNext());
        // nillable first
        QName element = (QName)elements.next();
        if ("minOccursProperty".equals(element.getLocalPart())) {
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

                    wsdl);
    }

    @Test
    public void testGetSetRequired() throws Exception {
        BeanType type = new BeanType(new AnnotatedTypeInfo(tm, BadBean.class, "urn:foo",
                                                           new TypeCreationOptions()));
        type.setSchemaType(new QName("urn:foo", "BadBean"));

        assertEquals(0, type.getTypeInfo().getElements().size());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.BeanType

                t = typeMapping.getTypeCreator().createType(c);
                typeMapping.register(t);
            }
            rootTypeQNames.add(t.getSchemaType());
            if (t instanceof BeanType) {
                BeanType bt = (BeanType)t;
                bt.getTypeInfo().setExtension(true);
                rootTypes.add(bt);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.