Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.addAttribute()


            log.error(msg);
            throw new SynapseException(msg);
        }

        if (mp.getValue() != null) {
            prop.addAttribute(fac.createOMAttribute("value", nullNS, mp.getValue()));

        } else if (mp.getExpression() != null) {
            SynapseXPathSerializer.serializeXPath(mp.getExpression(), prop, "expression");

        } else {
View Full Code Here


                                               QName childElementName) {

        for (MediatorProperty mp : props) {
            OMElement prop = fac.createOMElement(childElementName, parent);
            if (mp.getName() != null) {
                prop.addAttribute(fac.createOMAttribute("name", nullNS, mp.getName()));
            } else {
                handleException("Mediator property name missing");
            }

            if (mp.getValue() != null) {
View Full Code Here

            } else {
                handleException("Mediator property name missing");
            }

            if (mp.getValue() != null) {
                prop.addAttribute(fac.createOMAttribute("value", nullNS, mp.getValue()));

            } else if (mp.getExpression() != null) {
                SynapseXPathSerializer.serializeXPath(mp.getExpression(), prop, "expression");

            } else {
View Full Code Here

        }

        DBReportMediator mediator = (DBReportMediator) m;
        OMElement dbReport = fac.createOMElement("dbreport", synNS);
        if (mediator.isUseTransaction()) {
            dbReport.addAttribute(fac.createOMAttribute("useTransaction", nullNS, "true"));
        }
        saveTracingState(dbReport, mediator);
        serializeDBInformation(mediator, dbReport);

        return dbReport;
View Full Code Here

            Object o = ((Map.Entry) entryObj).getValue();

            if (key instanceof String) {
                OMElement entry = fac.createOMElement(new QName(
                        PayloadHelper.AXIOMPAYLOADNS, ENTRY), mapElement);
                entry.addAttribute(NAME, (String) key, attrNS);

                if (o instanceof Character) {
                    entry.addAttribute(TYPE, CHAR, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof Boolean) {
View Full Code Here

                OMElement entry = fac.createOMElement(new QName(
                        PayloadHelper.AXIOMPAYLOADNS, ENTRY), mapElement);
                entry.addAttribute(NAME, (String) key, attrNS);

                if (o instanceof Character) {
                    entry.addAttribute(TYPE, CHAR, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof Boolean) {
                    entry.addAttribute(TYPE, BOOLEAN, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof String) {
View Full Code Here

                if (o instanceof Character) {
                    entry.addAttribute(TYPE, CHAR, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof Boolean) {
                    entry.addAttribute(TYPE, BOOLEAN, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof String) {
                    entry.addAttribute(TYPE, STRING, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof Byte) {
View Full Code Here

                    entry.setText(o.toString());
                } else if (o instanceof Boolean) {
                    entry.addAttribute(TYPE, BOOLEAN, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof String) {
                    entry.addAttribute(TYPE, STRING, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof Byte) {
                    entry.addAttribute(TYPE, BYTE, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof byte[]) {
View Full Code Here

                    entry.setText(o.toString());
                } else if (o instanceof String) {
                    entry.addAttribute(TYPE, STRING, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof Byte) {
                    entry.addAttribute(TYPE, BYTE, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof byte[]) {
                    entry.addAttribute(TYPE, BYTEARRAY, attrNS);
                    OMText text = fac.createOMText(new DataHandler(
                            new ByteArrayDataSource((byte[]) o)), true);
View Full Code Here

                    entry.setText(o.toString());
                } else if (o instanceof Byte) {
                    entry.addAttribute(TYPE, BYTE, attrNS);
                    entry.setText(o.toString());
                } else if (o instanceof byte[]) {
                    entry.addAttribute(TYPE, BYTEARRAY, attrNS);
                    OMText text = fac.createOMText(new DataHandler(
                            new ByteArrayDataSource((byte[]) o)), true);
                    entry.addChild(text);
                } else if (o instanceof Float) {
                    entry.addAttribute(TYPE, FLOAT, attrNS);
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.