Package org.apache.cxf.aegis.type

Examples of org.apache.cxf.aegis.type.Type.readObject()


            elReader.readToEnd();
            return null;
        }

        try {
            return type.readObject(elReader, context);
        } catch (DatabindingException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here


        JDOMWriter writer = new JDOMWriter(root);

        type.writeObject(new EnumBean(), writer, getContext());

        JDOMReader reader = new JDOMReader(root);
        Object value = type.readObject(reader, getContext());

        assertTrue(value instanceof EnumBean);
        EnumBean bean = (EnumBean)value;
        assertNull(bean.getCurrency());
    }
View Full Code Here

            if (creader.isXsiNil()) {
                values.add(null);
                creader.readToEnd();
            } else {
                values.add(compType.readObject(creader, context));
            }

            // check max occurs
            int size = values.size();
            if (size > maxOccurs) {
View Full Code Here

            }

            throw new DatabindingException("No mapped type for '" + typeName + "' (" + typeQName + ")");
        }

        return type.readObject(reader, context);
    }

    private QName extractQName(MessageReader reader, String typeName) {
        int colon = typeName.indexOf(':');
View Full Code Here

                QName name = childReader.getName();

                Type type = inf.getType(name);

                if (type != null) {
                    Object writeObj = type.readObject(childReader, context);
                    writeProperty(name, target, writeObj, clazz, inf);
                }
            }

            // Read child elements
View Full Code Here

                // Get the Type for the property
                Type type = getElementType(name, propertyTypeInfo, childReader, context);

                if (type != null) {
                    if (!childReader.isXsiNil()) {
                        Object writeObj = type.readObject(childReader, context);

                        writeProperty(name, target, writeObj, clazz, propertyTypeInfo);
                    } else {
                        if (!propertyTypeInfo.isNillable(name)) {
                            throw new DatabindingException(name.getLocalPart()
View Full Code Here

                        MessageReader evReader = entryReader.getNextElementReader();

                        if (evReader.getName().equals(getKeyName())) {
                            key = kType.readObject(evReader, context);
                        } else if (evReader.getName().equals(getValueName())) {
                            value = vType.readObject(evReader, context);
                        } else {
                            readToEnd(evReader);
                        }
                    }
View Full Code Here

            Object value;
            if (creader.isXsiNil()) {
                value = null;
                creader.readToEnd();
            } else {
                value = compType.readObject(creader, context);
            }

            // add the value
            if (!sparse) {
                if (values.size() + 1 > maxSize) {
View Full Code Here

        JDOMWriter writer = new JDOMWriter(root);

        type.writeObject(new EnumBean(), writer, new Context());

        JDOMReader reader = new JDOMReader(root);
        Object value = type.readObject(reader, new Context());

        assertTrue(value instanceof EnumBean);
        EnumBean bean = (EnumBean)value;
        assertNull(bean.getCurrency());
    }
View Full Code Here

                QName name = childReader.getName();

                Type type = inf.getType(name);

                if (type != null) {
                    Object writeObj = type.readObject(childReader, context);
                    if (isProxy) {
                        delegate.writeProperty(name.getLocalPart(), writeObj);
                    } else {
                        writeProperty(name, object, writeObj, clazz, inf);
                    }
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.