Examples of toXml()


Examples of org.ggp.base.util.match.Match.toXML()

    // Open up the XML file for this match, and save the match there.
    f = new File(tourneyName + "/" + matchName + ".xml");
    if (f.exists()) f.delete();
    BufferedWriter bw = new BufferedWriter(new FileWriter(f));
    bw.write(match.toXML());
    bw.flush();
    bw.close();

    // Open up the JSON file for this match, and save the match there.
    f = new File(tourneyName + "/" + matchName + ".json");
View Full Code Here

Examples of org.glassfish.admin.rest.logviewer.LogRecord.toXML()

    if (type.equals("json")) {
        sb.append(sep);
        sb.append(rec.toJSON());
        sep = ",";
    } else {
        sb.append(rec.toXML());

    }
      }
  }
View Full Code Here

Examples of org.javalite.activejdbc.test_models.Person.toXml()

    @Test
    public void shouldGenerateSimpleXml(){
        deleteAndPopulateTable("people");
        Person p  = Person.findById(1);
        String xml = p.toXml(true, true);
        a(XPathHelper.selectText("//name", xml)).shouldEqual("John");
        a(XPathHelper.selectText("//last_name", xml)).shouldEqual("Smith");
    }

    @Test
View Full Code Here

Examples of org.javalite.activejdbc.test_models.User.toXml()

        deleteAndPopulateTables("users", "addresses");
        User.findById(1).add(Address.create("zip", 60606, "state", "IL", "address1", "123 Pine & Needles", "city", "Chicago"));
        List<User> personList = User.findAll().orderBy("id").include(Address.class);

        User u = personList.get(0);
        checkXmlStructure(u.toXml(true, true));
        checkXmlStructure(u.toXml(false, true));
    }

    private void checkXmlStructure(String xml){
        XPathHelper h = new XPathHelper(xml);
View Full Code Here

Examples of org.jclouds.xml.XMLParser.toXML()

   public static void assertPayloadEquals(final Payload payload, final String expected,
         final Class<? extends SingleResourceTransportDto> entityClass) throws IOException {
      // Serialize and deserialize to avoid formatting issues
      XMLParser xml = new JAXBParser("false");
      SingleResourceTransportDto entity = xml.fromXML(expected, entityClass);
      String toMatch = xml.toXML(entity, entityClass);

      assertEquals(payload.getRawContent(), toMatch);
   }
}
View Full Code Here

Examples of org.jclouds.xml.internal.JAXBParser.toXML()

    * {@link org.jclouds.logging.Logger#debug(String)}
    */
   protected void debug(final Object object) {
      JAXBParser parser = new JAXBParser("true");
      try {
         String xml = parser.toXML(object);
         logger.debug(Strings.padStart(Strings.padEnd(" " + object.getClass().toString() + " ", 70, '-'), 80, '-'));
         logger.debug(xml);
         logger.debug(Strings.repeat("-", 80));
      } catch (IOException ioe) {
         Throwables.propagate(ioe);
View Full Code Here

Examples of org.jets3t.service.acl.AccessControlList.toXml()

    S3Bucket bucket = new S3Bucket();
    bucket.setName("SomeReallyLongAndWackyBucketNamePath.HereItIs");
   
    AccessControlList updatedACL = acl;
    while ((updatedACL = AccessControlDialog.showDialog(f, new S3Bucket[] {bucket}, updatedACL, null)) != null) {
      System.out.println(updatedACL.toXml());
    }   
   
    f.dispose();   
  }
 
View Full Code Here

Examples of org.jets3t.service.model.CreateBucketConfiguration.toXml()

       
        if (location != null) {
            metadata.put("Content-Type", "text/xml");
            try {
                CreateBucketConfiguration config = new CreateBucketConfiguration(location);
                metadata.put("Content-Length", String.valueOf(config.toXml().length()));
                requestEntity = new StringRequestEntity(config.toXml(), "text/xml", Constants.DEFAULT_ENCODING);               
            } catch (UnsupportedEncodingException e) {
                throw new S3ServiceException("Unable to encode CreateBucketConfiguration XML document", e);
            }   
        }
View Full Code Here

Examples of org.jivesoftware.smack.packet.IQ.toXML()

    static class IQListener implements PacketListener {

        public void processPacket(Packet packet) {
            IQ iq = (IQ) packet;
            String iqString = iq.toString();
            System.out.println("T" + System.currentTimeMillis() + " IQ: " + iqString + ": " + iq.toXML());
        }
    }

    static class PresenceListener implements PacketListener {
View Full Code Here

Examples of org.jivesoftware.smack.packet.Message.toXML()

        xmppClientSidePacketListener = new XMPPClientSidePacketListener(msgCtx);
        xmppConnection.addPacketListener(xmppClientSidePacketListener,filter);
      }     

      chat.sendMessage(message);
      log.debug("Sent message :"+message.toXML());

      //If this is on client side, wait for the response from server.
      //Is this the best way to do this?
      if(waitForResponse && !msgCtx.isServerSide()){
        //TODO : need to add a timeout
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.