Examples of toXml()


Examples of org.xmlBlaster.client.key.GetReturnKey.toXml()

           clientTags +
           "</key>\n";
         MsgKeyData key = factory.readObject(xml);
         GetReturnKey getKey = new GetReturnKey(glob, xml);

         System.out.println("GetReturnKey: " + getKey.toXml());

         assertEquals("", "HELLO", getKey.getOid());
         assertEquals("", "RUGBY", getKey.getDomain());
         assertEquals("", "image/png", getKey.getContentMime());
         assertEquals("", "2.5", getKey.getContentMimeExtended());
View Full Code Here

Examples of org.xmlBlaster.client.key.PublishKey.toXml()

            return;
         }
         for (int ii=0; ii<msgArr.length; ii++) {
            PublishKey key = new PublishKey(glob, "__sys_jdbc."+ME, "text/xml", "SQLQuery");
            PublishQos qos = new PublishQos(glob, new Destination(new SessionName(glob, cust)));
            MsgUnitRaw msgUnitRaw = new MsgUnitRaw(msgArr[ii], key.toXml(), msgArr[ii].getContent(), qos.toXml());
            String  oid = callback.publish(msgUnitRaw);
            if (log.isLoggable(Level.FINEST)) log.finest("Delivered Results...\n" + new String(content));
         }
      }
      catch (XmlBlasterException e) {
View Full Code Here

Examples of org.xmlBlaster.client.key.SubscribeKey.toXml()

         if (action.equals(MethodName.SUBSCRIBE)) { // "subscribe"
            log.fine("subscribe arrived ...");
           
            if (oid != null) {
               SubscribeKey xmlKey = new SubscribeKey(glob, oid);
               SubscribeReturnQos ret = xmlBlaster.subscribe(xmlKey.toXml(), qos);
               log.info("Subscribed to simple key.oid=" + oid + ": " + ret.getSubscriptionId());
            }
            else if (key != null) {
               SubscribeReturnQos ret = xmlBlaster.subscribe(key, qos);
               log.info("Subscribed to " + key + ": SubscriptionId=" + ret.getSubscriptionId() + " qos=" + qos);
View Full Code Here

Examples of org.xmlBlaster.client.key.UpdateKey.toXml()

         try {
            msgArr = con.get(xmlKey, "<qos></qos>");
            log.info("Got " + msgArr.length + " messages for query '" + queryString + "':");
            for (int ii=0; ii<msgArr.length; ii++) {
               UpdateKey updateKey = new UpdateKey(glob, msgArr[ii].getKey());
               log.info("\n" + updateKey.toXml());
               log.info("\n" + new String(msgArr[ii].getContent()) + "\n");
            }
         } catch(XmlBlasterException e) {
            log.severe("XmlBlasterException: " + e.getMessage());
         }
View Full Code Here

Examples of org.xmlBlaster.client.qos.ConnectQos.toXml()

         ConnectQos connectQos = new ConnectQos(authenticate.getGlobal());
         connectQos.loadClientPlugin("htpasswd", "1.0", loginName, passwd);
         connectQos.getSessionQos().setSessionTimeout(0L);
         // TODO: Port to use "LOCAL" protocol to connect
         this.addressServer = new AddressServer(authenticate.getGlobal(), "NATIVE", authenticate.getGlobal().getId(), (java.util.Properties)null);
         String ret = authenticate.connect(addressServer, connectQos.toXml(), null); // synchronous access only, no callback.
         ConnectReturnQos retQos = new ConnectReturnQos(authenticate.getGlobal(), ret);
         this.secretSessionId = retQos.getSecretSessionId();
         log.info("login for '" + loginName + "' successful.");
      }
View Full Code Here

Examples of org.xmlBlaster.client.qos.ConnectReturnQos.toXml()

          log.severe("Update failed: " + e.toString());
        }
        return "";
      }
         })// Login to xmlBlaster, register for updates
         log.info("Connect success as " + crq.toXml());

         org.xmlBlaster.util.StopWatch stopWatch = new org.xmlBlaster.util.StopWatch();
         for(int i=0; true; i++) {
            if (numPublish != -1)
               if (i>=numPublish)
View Full Code Here

Examples of org.xmlBlaster.client.qos.DisconnectQos.toXml()

      sb.append(offset).append("</").append(MethodName.CONNECT.getMethodName()).append(">");
     
      DisconnectQos dis = getDisconnectQos();
      if (dis != null) {
         sb.append(offset).append("<").append(MethodName.DISCONNECT.getMethodName()).append(">");
         sb.append(dis.toXml(extraOffset + Constants.INDENT, props));
         sb.append(offset).append("</").append(MethodName.DISCONNECT.getMethodName()).append(">");
      }

      /*
      sb.append(offset).append("<info>");
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos.toXml()

      log.info("Erasing a topic forceDestroy=" + forceDestroy);
      try {
         EraseQos eq = new EraseQos(glob);
         eq.setForceDestroy(forceDestroy);
         EraseKey ek = new EraseKey(glob, this.publishOid);
         EraseReturnQos[] er = con.erase(ek.toXml(), eq.toXml());
         return er;
      } catch(XmlBlasterException e) {
         fail("Erase XmlBlasterException: " + e.getMessage());
      }
      return null;
View Full Code Here

Examples of org.xmlBlaster.client.qos.PublishQos.toXml()

            return;
         }
         for (int ii=0; ii<msgArr.length; ii++) {
            PublishKey key = new PublishKey(glob, "__sys_jdbc."+ME, "text/xml", "SQLQuery");
            PublishQos qos = new PublishQos(glob, new Destination(new SessionName(glob, cust)));
            MsgUnitRaw msgUnitRaw = new MsgUnitRaw(msgArr[ii], key.toXml(), msgArr[ii].getContent(), qos.toXml());
            String  oid = callback.publish(msgUnitRaw);
            if (log.isLoggable(Level.FINEST)) log.finest("Delivered Results...\n" + new String(content));
         }
      }
      catch (XmlBlasterException e) {
View Full Code Here

Examples of org.xmlBlaster.client.qos.PublishReturnQos.toXml()

         log.warning("XmlBlasterException: " + e.getMessage());
         assertTrue("publish - XmlBlasterException: " + e.getMessage(), false);
      }

      assertTrue("returned publishOid == null", publishOid != null);
      assertTrue("returned publishOid: " + publishReturnQos.toXml(), 0 != publishOid.length());
   }

   /**
    * TEST: subscribe and unSubscribe on an empty topic (without a publish)
    * The unSubscribe is done with an oid instead of a subId
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.