Package org.apache.cxf.aegis.type

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


            if (type.isNillable() && type.isWriteOuter() && obj == null) {
                w2.writeXsiNil();
                return;
            }

            type.writeObject(obj, w2, context);
            w2.close();
        } catch (DatabindingException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here


                addXsiType(writer, type.getSchemaType().getLocalPart());
            } else {
                addXsiType(writer, prefix + ":" + type.getSchemaType().getLocalPart());
            }

            type.writeObject(object, writer, context);
        }
    }

    private Type determineType(Context context, Class clazz) {
        TypeMapping tm = context.getTypeMapping();
View Full Code Here

                                                   + " for property " + name);
                }

                MessageWriter cwriter = writer.getAttributeWriter(name);

                type.writeObject(value, cwriter, context);

                cwriter.close();
            }
        }
View Full Code Here

                if (type == null) {
                    throw new DatabindingException("Couldn't find type for " + value.getClass()
                                                   + " for property " + name);
                }

                type.writeObject(value, cwriter, context);

                cwriter.close();
            } else if (inf.isNillable(name)) {
                cwriter = getWriter(writer, name, type);
View Full Code Here

            }
        }
        if (inf.isExtension()) {
            Type t = getSuperType();
            if (t != null) {
                t.writeObject(object, writer, context);
            }
        }
    }

    private MessageWriter getWriter(MessageWriter writer, QName name, Type type) {
View Full Code Here

                                                   + " for property " + name);
                }

                MessageWriter cwriter = writer.getAttributeWriter(name);

                type.writeObject(value, cwriter, context);

                cwriter.close();
            }
        }
View Full Code Here

                if (type == null) {
                    throw new DatabindingException("Couldn't find type for " + value.getClass()
                                                   + " for property " + name);
                }

                type.writeObject(value, cwriter, context);

                cwriter.close();
            } else if (inf.isNillable(name)) {
                cwriter = getWriter(writer, name, type);
View Full Code Here

            }
        }
        if (inf.isExtension()) {
            Type t = getSuperType();
            if (t != null) {
                t.writeObject(object, writer, context);
            }
        }
    }

    private MessageWriter getWriter(MessageWriter writer, QName name, Type type) {
View Full Code Here

            if (type.isNillable() && type.isWriteOuter() && obj == null) {
                w2.writeXsiNil();
                return;
            }

            type.writeObject(obj, w2, context);
            w2.close();
        } catch (DatabindingException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        tm.register(type);

        Element root = new Element("root");
        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);
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.