Package org.apache.cxf.aegis.xml

Examples of org.apache.cxf.aegis.xml.MessageWriter.writeXsiNil()


        MessageWriter cwriter = writer.getElementWriter(type.getSchemaType().getLocalPart(), "");

        if (value == null && type.isNillable()) {
            // null
            cwriter.writeXsiNil();
        } else if (type instanceof BeanType || type instanceof SoapArrayType) {
            // write refs to complex type
            String refId = MarshalRegistry.get(context).getInstanceId(value);
            SoapEncodingUtil.writeRef(cwriter, refId);
        } else {
View Full Code Here


        } else {
            cwriter = writer;
        }

        if (value == null && type.isNillable()) {
            cwriter.writeXsiNil();
        } else {
            type.writeObject(value, cwriter, context);
        }
       
        if (type.isWriteOuter()) {
View Full Code Here

                writeElement(name, value, type, writer, context);
            } else if (inf.isNillable(name)) {
                MessageWriter cwriter = getWriter(writer, name, type);

                // Write the xsi:nil if it is null.
                cwriter.writeXsiNil();

                cwriter.close();
            }
        }
        if (inf.isExtension()) {
View Full Code Here

        } else {
            cwriter = writer;
        }

        if (value == null && type.isNillable()) {
            cwriter.writeXsiNil();
        } else {
            type.writeObject(value, cwriter, context);
        }
       
        if (type.isWriteOuter()) {
View Full Code Here

        try {
            W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter(output);
            ElementWriter writer = new ElementWriter(domWriter);
            MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
            if (type.isNillable() && type.isWriteOuter() && obj == null) {
                w2.writeXsiNil();
                w2.close();
                return;
            }

            type.writeObject(obj, w2, context);
View Full Code Here

                    //skip writing minOccurs=0 stuff if obj is null
                    return;
                } else if (type.isNillable()) {
                    ElementWriter writer = new ElementWriter(output);
                    MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
                    w2.writeXsiNil();
                    w2.close();
                    return;
                }
            }
            ElementWriter writer = new ElementWriter(output);
View Full Code Here

        MessageWriter cwriter = writer.getElementWriter(type.getSchemaType().getLocalPart(), "");

        if (value == null && type.isNillable()) {
            // null
            cwriter.writeXsiNil();
        } else if (type instanceof BeanType || type instanceof SoapArrayType) {
            // write refs to complex type
            String refId = MarshalRegistry.get(context).getInstanceId(value);
            SoapEncodingUtil.writeRef(cwriter, refId);
        } else {
View Full Code Here

                return;
            }
            if (aegisType.isNillable() && aegisType.isWriteOuter()) {
                ElementWriter writer = new ElementWriter(output);
                MessageWriter w2 = writer.getElementWriter(elementName);
                w2.writeXsiNil();
                w2.close();
                return;
            }
        }
       
View Full Code Here

        try {
            W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter(output);
            ElementWriter writer = new ElementWriter(domWriter);
            MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
            if (type.isNillable() && type.isWriteOuter() && obj == null) {
                w2.writeXsiNil();
                w2.close();
                return;
            }

            type.writeObject(obj, w2, context);
View Full Code Here

                    //skip writing minOccurs=0 stuff if obj is null
                    return;
                } else if (type.isNillable() && type.isWriteOuter()) {
                    ElementWriter writer = new ElementWriter(output);
                    MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
                    w2.writeXsiNil();
                    w2.close();
                    return;
                }
            }
            ElementWriter writer = new ElementWriter(output);
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.