Package org.apache.cxf.aegis.type

Examples of org.apache.cxf.aegis.type.TypeCreationOptions


    @Test
    public void testObjectDTO() {
        tm = new DefaultTypeMapping(SOAPConstants.XSD);
        creator = new Java5TypeCreator();
        creator.setConfiguration(new TypeCreationOptions());
        tm.setTypeCreator(creator);

        Type dto = creator.createType(ObjectDTO.class);
        Set deps = dto.getDependencies();
View Full Code Here


    }

    @Test
    public void testType() {
        AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, AnnotatedBean1.class, "urn:foo",
                                                       new TypeCreationOptions());

        Iterator elements = info.getElements().iterator();
        assertTrue(elements.hasNext());
        QName element = (QName)elements.next();
        assertTrue(elements.hasNext());
View Full Code Here

    }

    @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

    }

    @Test
    public void testType() {
        AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, JaxbBean1.class, "urn:foo",
                                                       new TypeCreationOptions());

        Iterator elements = info.getElements().iterator();
        assertTrue(elements.hasNext());
        QName element = (QName)elements.next();
        assertTrue(elements.hasNext());
View Full Code Here

    }

    @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

    }
   
    @Test
    public void testAnnotatedDefaultQualifiedAttribute() throws Exception {
        AegisContext context = new AegisContext();
        TypeCreationOptions typeCreationOptions =
            new TypeCreationOptions();
        typeCreationOptions.setQualifyAttributes(true);
        context.setTypeCreationOptions(typeCreationOptions);
        context.initialize();
        TypeMapping mapping = context.getTypeMapping();
       
        Type type = mapping.getTypeCreator().createType(AttributeBean.class);
View Full Code Here

    }
   
    @Test
    public void testAnnotatedDefaultQualifiedAttribute() throws Exception {
        AegisContext context = new AegisContext();
        TypeCreationOptions typeCreationOptions =
            new TypeCreationOptions();
        typeCreationOptions.setQualifyAttributes(true);
        context.setTypeCreationOptions(typeCreationOptions);
        context.initialize();
        TypeMapping mapping = context.getTypeMapping();
       
        AegisType type = mapping.getTypeCreator().createType(AttributeBean.class);
View Full Code Here

    }
   
    @Test
    public void testXmlDefaultQualifiedAttribute() throws Exception {
        AegisContext context = new AegisContext();
        TypeCreationOptions typeCreationOptions =
            new TypeCreationOptions();
        typeCreationOptions.setQualifyAttributes(true);
        context.setTypeCreationOptions(typeCreationOptions);
        context.initialize();
        TypeMapping mapping = context.getTypeMapping();
       
        AegisType type = mapping.getTypeCreator().createType(XmlMappedAttributeBean.class);
View Full Code Here

     * @param mappingNamespaceURI URI to select mappings based on the encoding.
     */
    public void initialize() {
        // allow spring config of an alternative mapping.
        if (configuration == null) {
            configuration = new TypeCreationOptions();
        }
        if (typeMapping == null) {
            boolean defaultNillable = configuration.isDefaultNillable();
            TypeMapping baseTM = DefaultTypeMapping.createDefaultTypeMapping(defaultNillable,
                                                                             mtomUseXmime,
View Full Code Here

    }

    @Test
    public void testType() {
        AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, XFireBean1.class, "urn:foo",
                                                       new TypeCreationOptions());

        Iterator<QName> elements = info.getElements().iterator();
        assertTrue(elements.hasNext());
        QName element = elements.next();
        assertTrue(elements.hasNext());
View Full Code Here

TOP

Related Classes of org.apache.cxf.aegis.type.TypeCreationOptions

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.