Package org.xmlpull.v1.builder

Examples of org.xmlpull.v1.builder.XmlElement.addChild()


        // Input
        XmlElement arrayElement = XmlConstants.BUILDER.newFragment("input");
        for (int i = 0; i < 5; i++) {
            XmlElement valueElement = arrayElement.addElement("value");
            valueElement.addChild("" + i);
        }

        inputMessage.setObjectPart("input", arrayElement);

        logger.info("Sending a message:\n"
View Full Code Here


        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("typens",
                "http://www.extreme.indiana.edu/math/arrayadder/xsd/");
        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace,
                "ArrayAdderOutput");
        XmlElement sumElement = outputElement.addElement("sum");
        sumElement.addChild(sumString);

        if (notifier != null) {
            notifier.sendingResult(outputElement);
        }
        logger.finest(XMLUtil.xmlElementToString(outputElement));
View Full Code Here

                "approvertypens",
                "http://www.extreme.indiana.edu/loan/approver/xsd/");
        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace,
                "ApproveOutput");
        XmlElement acceptElement = outputElement.addElement("accept");
        acceptElement.addChild(accept);

        if (notifier != null) {
            notifier.sendingResult(outputElement);
        }
        logger.finest(XMLUtil.xmlElementToString(outputElement));
View Full Code Here

    private void createMessage(String paramName, Object value, XmlElement inputMsgElem)
            throws ComponentRegistryException {
        XmlElement paramsElem = builder.newFragment(this.requestNS, paramName);
        if (value instanceof String) {
            paramsElem.addChild(value);
        } else if (value instanceof Collection) {
            Collection list = (Collection) value;
            Iterator arrayValues = list.iterator();
            while (arrayValues.hasNext()) {
                XmlElement item = builder.newFragment("value");
View Full Code Here

        } else if (value instanceof Collection) {
            Collection list = (Collection) value;
            Iterator arrayValues = list.iterator();
            while (arrayValues.hasNext()) {
                XmlElement item = builder.newFragment("value");
                item.addChild(arrayValues.next());
                paramsElem.addChild(item);
            }
        } else if (value instanceof ArrayList) {
            Collection list = (Collection) value;
            Iterator arrayValues = list.iterator();
View Full Code Here

        } else if (value instanceof ArrayList) {
            Collection list = (Collection) value;
            Iterator arrayValues = list.iterator();
            while (arrayValues.hasNext()) {
                XmlElement item = builder.newFragment("value");
                item.addChild(arrayValues.next());
                paramsElem.addChild(item);
            }
        } else if (value instanceof String[]) {
            String[] list = (String[]) value;
            for (int i = 0; i < list.length; i++) {
View Full Code Here

            }
        } else if (value instanceof String[]) {
            String[] list = (String[]) value;
            for (int i = 0; i < list.length; i++) {
                XmlElement item = builder.newFragment("value");
                item.addChild(list[i]);
                paramsElem.addChild(item);
            }
        } else {
            throw new ComponentRegistryException("Simple WS Client can not handle the value of type " + value);
        }
View Full Code Here

        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("addertypens",
                "http://www.extreme.indiana.edu/math/adder/xsd/");
        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "AddOutput");
        XmlElement zElement = outputElement.addElement("z");
        zElement.addChild(zString);

        if (notifier != null) {
            notifier.sendingResult(outputElement);
        }
        logger.info(XMLUtil.xmlElementToString(outputElement));
View Full Code Here

    private void writeSplitorPerService(XmlElement scufl, WSNode node) throws GraphException {
        List<DataPort> inputPorts = node.getInputPorts();
        XmlElement processor = scufl.addElement(scuflNS, "processor");
        processor.addAttribute("name", getValidName(node) + "InputMessagePartXML");
        XmlElement local = processor.addElement(scuflNS, "local");
        local.addChild(0, "org.embl.ebi.escience.scuflworkers.java.XMLInputSplitter");
        XmlElement extensions = local.addElement(scuflNS, "extensions");

        QName inputName = getInputElementName(node);
        if (null == inputName) {
            throw new GraphException("No Valid input type found for WS Node" + node.getName());
View Full Code Here

        // /outspiltor
        XmlElement outProcessor = scufl.addElement(scuflNS, "processor");
        outProcessor.addAttribute("name", getValidName(node) + "OutputMessagePartXML");
        XmlElement outLocal = outProcessor.addElement(scuflNS, "local");
        outLocal.addChild(0, "org.embl.ebi.escience.scuflworkers.java.XMLOutputSplitter");
        XmlElement outExtensions = outLocal.addElement(scuflNS, "extensions");
        XmlElement outComplextype = outExtensions.addElement(scuflNS, "complextype");
        outComplextype.addAttribute("optional", "false");
        outComplextype.addAttribute("unbounded", "false");
        outComplextype.addAttribute("typename", component.getOutputTypeName());
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.