Examples of TypeCreationOptions


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

    }

    @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

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

    }

    @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.TypeCreationOptions

    }
   
    @Test
    public void testNillableAnnotation() throws Exception {
        context = new AegisContext();
        TypeCreationOptions config = new TypeCreationOptions();
        config.setDefaultNillable(false);
        config.setDefaultMinOccurs(1);
        context.setTypeCreationOptions(config);
        context.initialize();
        mapping = context.getTypeMapping();

        BeanType type = (BeanType)mapping.getTypeCreator().createType(BeanWithNillableItem.class);
View Full Code Here

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

   
   
    @Test
    public void testNillableIntMinOccurs1() throws Exception {
        context = new AegisContext();
        TypeCreationOptions config = new TypeCreationOptions();
        config.setDefaultMinOccurs(1);
        config.setDefaultNillable(false);
        context.setTypeCreationOptions(config);
        context.initialize();
        mapping = context.getTypeMapping();

        BeanType type = (BeanType)mapping.getTypeCreator().createType(IntBean.class);
View Full Code Here

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

    }

    @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

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

    }

    @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.TypeCreationOptions

        AegisDatabinding binder = new AegisDatabinding();

        JaxWsServerFactoryBean serviceFactory = new JaxWsServerFactoryBean();
        serviceFactory.getServiceFactory().setDataBinding(binder);

        TypeCreationOptions configuration = binder.getAegisContext().getTypeCreationOptions();
        configuration.setDefaultMinOccurs(1);
        configuration.setDefaultNillable(false);

        binder.getAegisContext().setWriteXsiTypes(true);
        serviceFactory.setAddress("local://DuplicateArrayService");
        serviceFactory.setServiceBean(new DuplicateArrayServiceBean());
        serviceFactory.setServiceClass(DuplicateArrayService.class);
View Full Code Here

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

        super.setUp();

        tm = new DefaultTypeMapping(null, DefaultTypeMapping.createDefaultTypeMapping(false, false));
        creator = new Java5TypeCreator();
        creator.setNextCreator(new DefaultTypeCreator());
        creator.setConfiguration(new TypeCreationOptions());
        tm.setTypeCreator(creator);
    }
View Full Code Here

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

    @Before
    public void setUp() throws Exception {
        super.setUp();

        AegisContext context = new AegisContext();
        config = new TypeCreationOptions();
        context.setTypeCreationOptions(config);
        context.initialize();
        XMLTypeCreator creator = new XMLTypeCreator();
        creator.setConfiguration(config);
        Java5TypeCreator next = new Java5TypeCreator();
View Full Code Here

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

     * @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
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.