Package org.jdom

Examples of org.jdom.Element.addContent()


            resultsElement = produceMsg(select, rmdata, resultsElement);

            // -------------------------
            // Add the Table element ...
            // -------------------------
            resultsElement.addContent(new Element(TagNames.Elements.TABLE));
            Element tableElement = resultsElement.getChild(TagNames.Elements.TABLE);
            int rowCount = 0;
            int colCount = rmdata.getColumnCount();

            while ( object.next() && (object.getRow() <= endRow) ) {
View Full Code Here


                    Element cellElement = new Element(TagNames.Elements.TABLE_CELL);
                    Object cellValue = object.getObject(i);
                    if ( cellValue != null ) {
                        cellElement = produceMsg(cellValue, cellElement);
                    } else {
                        cellElement = cellElement.addContent(TagNames.Elements.NULL);
                    }
                    rowElement.addContent(cellElement);
                }
                tableElement.addContent(rowElement);
                rowCount++;
View Full Code Here

                    Element cellElement = new Element(TagNames.Elements.TABLE_CELL);
                    Object cellValue = object.getObject(i);
                    if ( cellValue != null ) {
                        cellElement = produceMsg(cellValue, cellElement);
                    } else {
                        cellElement = cellElement.addContent(TagNames.Elements.NULL);
                    }
                    rowElement.addContent(cellElement);
                }
                tableElement.addContent(rowElement);
                rowCount++;
View Full Code Here

      // Create root JDOM element
      Element rootElement = new Element(TagNames.Elements.ROOT_ELEMENT);

      // Create Query element
      Element queryElement = new Element(TagNames.Elements.QUERY);
      queryElement.addContent(new CDATA(query));
      rootElement.addContent(queryElement);

      // create a result attribute for the queryID
      Attribute resultsIDAttribute = new Attribute(
        TagNames.Attributes.NAME, queryID);
View Full Code Here

    Element exceptionElement = new Element(
      TagNames.Elements.QUERY_RESULTS);
    // produce xml for the actualException and this to the
    // exceptionElement
    if (ex != null) {
        exceptionElement.addContent(jstrat.produceMsg(ex, null));
    }
    // set the resultsIDAttribute on the exception element
    exceptionElement.setAttribute(resultsIDAttribute);
    // add the results elements to the root element
    rootElement.addContent(exceptionElement);
View Full Code Here

        XFireFault fault = new XFireFault(new Exception());
        fault.setRole("http://someuri");
        fault.setSubCode(new QName("urn:test", "NotAvailable", "m"));
        Element e = new Element("bah", "t", "urn:test");
        e.addContent("bleh");
        fault.getDetail().addContent(e);

        e = new Element("bah2", "t", "urn:test2");
        e.addContent("bleh");
        fault.getDetail().addContent(e);
View Full Code Here

        Element e = new Element("bah", "t", "urn:test");
        e.addContent("bleh");
        fault.getDetail().addContent(e);

        e = new Element("bah2", "t", "urn:test2");
        e.addContent("bleh");
        fault.getDetail().addContent(e);

        fault.addNamespace("m", "urn:test");

        ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

        XFireFault fault = new XFireFault(new Exception());
        fault.setRole("http://someuri");
       
        Element e = new Element("bah", "t", "urn:test");
        e.addContent("bleh");
        fault.getDetail().addContent(e);

        e = new Element("bah2", "t", "urn:test2");
        e.addContent("bleh");
        fault.getDetail().addContent(e);
View Full Code Here

        Element e = new Element("bah", "t", "urn:test");
        e.addContent("bleh");
        fault.getDetail().addContent(e);

        e = new Element("bah2", "t", "urn:test2");
        e.addContent("bleh");
        fault.getDetail().addContent(e);

        fault.addNamespace("m", "urn:test");

        ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

   
    public void testInvoke()
            throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Transport transport = getTransportManager().getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");
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.