Package org.xmlBlaster.util.key

Examples of org.xmlBlaster.util.key.MsgKeyData.toXml()


      //String mime = messageWrapper.getContentMime();
      byte[] content = messageWrapper.getMsgUnit().getContent();

      String oid = xmlKey.getOid(); // The file name

      FileLocator.writeFile(path, oid + XMLKEY_TOKEN, xmlKey.toXml().getBytes());
      FileLocator.writeFile(path, oid, content);
      FileLocator.writeFile(path, oid + XMLQOS_TOKEN, qos.toXml().getBytes());

      if (log.isLoggable(Level.FINE)) log.fine("Successfully stored " + oid);
   }
View Full Code Here


         String xml =
           "<key oid='HELLO' contentMime='image/gif' contentMimeExtended='1.0' domain='RUGBY'>\n" +
           "   <filter><subtag></subtag></filter>\n" +
           "</key>\n";
         MsgKeyData key = factory.readObject(xml);
         String newXml = key.toXml();
         log.info("New XML=" + newXml);
         key = factory.readObject(newXml);

         assertEquals("", "HELLO", key.getOid());
         assertEquals("", "image/gif", key.getContentMime());
View Full Code Here

     
      try {
         String keyLiteral = "<key oid='oid' ><client><xkey><xqos><xkey>xxx</xkey></xqos></xkey></client></key>";
         MsgKeyData key = factory.readObject(keyLiteral);
         log.info("testEmbeddedKeyTag: key (should)='" + keyLiteral);
         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());        
         assertXMLEqual(keyLiteral, key.toXml());
         keyLiteral = "<key oid='oid' ><client><key><qos><key>xxx</key></qos></key></client></key>";
         key = factory.readObject(keyLiteral);
         log.info("testEmbeddedKeyTag: key (should)='" + keyLiteral);
         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());
View Full Code Here

      try {
         String keyLiteral = "<key oid='oid' ><client><xkey><xqos><xkey>xxx</xkey></xqos></xkey></client></key>";
         MsgKeyData key = factory.readObject(keyLiteral);
         log.info("testEmbeddedKeyTag: key (should)='" + keyLiteral);
         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());        
         assertXMLEqual(keyLiteral, key.toXml());
         keyLiteral = "<key oid='oid' ><client><key><qos><key>xxx</key></qos></key></client></key>";
         key = factory.readObject(keyLiteral);
         log.info("testEmbeddedKeyTag: key (should)='" + keyLiteral);
         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());
         assertXMLEqual(keyLiteral, key.toXml());
View Full Code Here

         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());        
         assertXMLEqual(keyLiteral, key.toXml());
         keyLiteral = "<key oid='oid' ><client><key><qos><key>xxx</key></qos></key></client></key>";
         key = factory.readObject(keyLiteral);
         log.info("testEmbeddedKeyTag: key (should)='" + keyLiteral);
         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());
         assertXMLEqual(keyLiteral, key.toXml());
      }
      catch (Throwable e) {
         System.out.println("Test failed: " + e.toString());
      }
View Full Code Here

         assertXMLEqual(keyLiteral, key.toXml());
         keyLiteral = "<key oid='oid' ><client><key><qos><key>xxx</key></qos></key></client></key>";
         key = factory.readObject(keyLiteral);
         log.info("testEmbeddedKeyTag: key (should)='" + keyLiteral);
         log.info("testEmbeddedKeyTag: key (is)    ='" + key.toXml());
         assertXMLEqual(keyLiteral, key.toXml());
      }
      catch (Throwable e) {
         System.out.println("Test failed: " + e.toString());
      }
      System.out.println("***MsgKeyFactoryTest: EmbeddedKeyTag [SUCCESS]");
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.