Package org.apache.cxf.aegis

Examples of org.apache.cxf.aegis.AegisContext


        assertTrue("ball-of-yarn".equals(something));
    }
   
    @Test
    public void testCollectionReadNoXsiType() throws Exception {
        context = new AegisContext();
        Set<java.lang.reflect.Type> roots = new HashSet<java.lang.reflect.Type>();
        java.lang.reflect.Type listStringType
            = ListStringInterface.class.getMethods()[0].getGenericReturnType();
        roots.add(listStringType);
        context.setRootClasses(roots);
View Full Code Here


        assertEquals(correctAnswer, something);
    }
   
    @Test
    public void testCollectionReadXsiType() throws Exception {
        context = new AegisContext();
        Set<java.lang.reflect.Type> roots = new HashSet<java.lang.reflect.Type>();
        java.lang.reflect.Type listStringType
            = ListStringInterface.class.getMethods()[0].getGenericReturnType();
        roots.add(listStringType);
        context.setRootClasses(roots);
View Full Code Here

   
   
    // test using a .aegis.xml
    @Test
    public void testSimpleBeanRead() throws Exception {
        context = new AegisContext();
        Set<java.lang.reflect.Type> rootClasses = new HashSet<java.lang.reflect.Type>();
        rootClasses.add(SimpleBean.class);
        context.setRootClasses(rootClasses);
        context.initialize();
        XMLStreamReader streamReader =
View Full Code Here

        super.setUp();

        addNamespace("b", "urn:beanz");
        addNamespace("xsi", SOAPConstants.XSI_NS);

        context = new AegisContext();
        // create a different mapping than the context creates.
        TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false, false);
        mapping = new DefaultTypeMapping(SOAPConstants.XSD, baseMapping);
        mapping.register(XMLStreamReader.class,
                         new QName("urn:Bean", "SimpleBean"), new XMLStreamReaderType());
View Full Code Here

        beanReader.nextTag();
        assertEquals("bleh", beanReader.getLocalName());
    }
   
    protected Context getContext() {
        AegisContext globalContext = new AegisContext();
        globalContext.initialize();
        globalContext.setTypeMapping(mapping);
        return new Context(globalContext);
    }
View Full Code Here

    @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();
        next.setConfiguration(config);
        creator.setNextCreator(next);

        tm = (DefaultTypeMapping)context.getTypeMapping();
        tm.setTypeCreator(creator);
    }
View Full Code Here

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

        context = new AegisContext();
        context.initialize();
        mapping = context.getTypeMapping();
    }
View Full Code Here

        addNamespace("xsi", SOAPConstants.XSI_NS);

    }

    private void defaultContext() {
        context = new AegisContext();
        context.initialize();
        mapping = context.getTypeMapping();
    }
View Full Code Here

        assertTrue(int2ok);
    }

    @Test
    public void testNillableAnnotation() throws Exception {
        context = new AegisContext();
        TypeCreationOptions config = new TypeCreationOptions();
        config.setDefaultNillable(false);
        config.setDefaultMinOccurs(1);
        context.setTypeCreationOptions(config);
        context.initialize();
View Full Code Here

    }


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

TOP

Related Classes of org.apache.cxf.aegis.AegisContext

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.