Package org.codehaus.xfire.aegis.stax

Examples of org.codehaus.xfire.aegis.stax.ElementReader


        nsmap.put("xsd", SoapConstants.XSD);
       
        MessageContext context = new MessageContext();
        context.setProperty(ReadHeadersHandler.DECLARED_NAMESPACES, nsmap);
       
        type.readObject(new ElementReader(getResourceAsStream("/org/codehaus/xfire/xmlbeans/undeclaredns.xml")),
                        context);
    }
View Full Code Here


        BeanType type = new BeanType();
        type.setTypeClass(IMyInterface.class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:MyInterface", "data"));

        ElementReader reader = new ElementReader(
                getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/MyInterface.xml"));
        IMyInterface data = (IMyInterface) type.readObject(reader, new MessageContext());
        assertEquals("junk", data.getName());
        assertEquals(true, data.isUseless());
        data.setName("bigjunk");
View Full Code Here

        BeanType type = new BeanType();
        type.setTypeClass(IMyInterface.class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:MyInterface", "data"));

        ElementReader reader = new ElementReader(
                getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/MyInterface.xml"));
        IMyInterface data = (IMyInterface) type.readObject(reader, new MessageContext());

        try
        {
View Full Code Here

        BeanType type = new BeanType();
        type.setTypeClass(IMyInterface.class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:MyInterface", "data"));

        ElementReader reader = new ElementReader(
                getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/MyInterface.xml"));
        IMyInterface data = (IMyInterface) type.readObject(reader, new MessageContext());

        try
        {
View Full Code Here

        BeanType type = new BeanType();
        type.setTypeClass(IMyInterface.class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:MyInterface", "data"));

        ElementReader reader = new ElementReader(
                getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/MyInterface.xml"));
        IMyInterface data = (IMyInterface) type.readObject(reader, new MessageContext());

        try
        {
View Full Code Here

        BeanType type = new BeanType();
        type.setTypeClass(IMyInterface.class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:MyInterface", "data"));

        ElementReader reader = new ElementReader(
                getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/MyInterface.xml"));
        IMyInterface data = (IMyInterface) type.readObject(reader, new MessageContext());

        assertEquals("junk", data.getName());
        assertNull(data.getType());
View Full Code Here

        type2.setTypeClass(IMyInterface2.class);
        type2.setSchemaType(new QName("urn:MyInterface2", "myInterface2"));
        type2.setTypeMapping(mapping);
        type2.getTypeInfo().mapType(new QName("urn:MyInterface", "myInterface"), type);

        ElementReader reader = new ElementReader(
                getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/MyInterface2.xml"));
        IMyInterface2 data = (IMyInterface2) type2.readObject(reader, new MessageContext());

        assertNotNull(data.getMyInterface());
        assertEquals("junk", data.getMyInterface().getName());
View Full Code Here

        throws XFireFault
    {
        try
        {
            IUnmarshallingContext mctx = bfact.createUnmarshallingContext();
            ElementReader r = (ElementReader) reader;
            FragmentStreamReader fsr = new FragmentStreamReader(r.getXMLStreamReader());
            fsr.next();
            StAXReaderWrapper wrapper = new StAXReaderWrapper(
                    fsr,
                    getSchemaType().getLocalPart(),
                    true);
View Full Code Here

       
        Type dtoType = mapping.getTypeCreator().createType(DateDTO.class);
        mapping.register(dtoType);
       
        // Test reading
        ElementReader reader = new ElementReader(getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/dates.xml"));
       
        Object obj = dtoType.readObject(reader, new MessageContext());
        DateDTO dto = (DateDTO) obj;
        assertNotNull(dto.getDate0());
        assertNotNull(dto.getDateTime0());
View Full Code Here

        if (type == null)
            type = (Type) p.getSchemaType();
       
        type = getReadType(xsr, context, type);

        MessageReader reader = new ElementReader(xsr);

        if (reader.isXsiNil())
        {
            reader.readToEnd();
            return null;
        }

        context.setProperty(CURRENT_MESSAGE_PART, p);
        return type.readObject(reader, context);
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.aegis.stax.ElementReader

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.