Package nexj.core.rpc.soap

Examples of nexj.core.rpc.soap.SOAPMarshaller$PrimitiveMarshaller


            resultList.addAll((List)RPCUtil.transfer(query.read(), attributes, identityMap, RPCUtil.TF_ALL));
         }

         writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(file)), XMLUtil.ENCODING);

         new SOAPMarshaller(m_context).serialize(resultList, writer);
      }
      catch (Exception e)
      {
         bDeleteFile = true;
         throw e;
View Full Code Here


      Writer writer = null;
     
      try
      {
         StringWriter sw = new StringWriter(4096);
         new SOAPMarshaller(new InvocationContext(
            new XMLMetadata("", null, null, null, null))).serialize(obj, sw);

         String str = XMLUtil.formatXML(sw.toString());
         StringBuffer buf = new StringBuffer(4096);
         boolean bGenerate = StringUtil.parseBoolean(SysUtil.getConfigProperties().getProperty(REF_GENERATE_PROPERTY, "false"));
View Full Code Here

     
      System.err.println("XML vs. SOAP Marshaller Profiling Comparison");

      // --- XML test

      SOAPMarshaller marshaller =
         new XMLMarshaller(new InvocationContext(Repository.getMetadata()),
                           Repository.getMetadata());

      for (int i = 0; i < nWarmup; ++i)
      {
         marshaller.serialize(req, writer);
      }

      long lStartTime = System.currentTimeMillis();
     
      for (int i = 0; i < nIterations; ++i)
      {
         counterArray[0] = 0;
         marshaller.serialize(req, writer);
      }

      long lEndTime = System.currentTimeMillis();
      long nSizeXML = counterArray[0];
      long nTotalTimeXML = lEndTime - lStartTime;

      System.err.println("Run: " + nIterations + " iterations in: " + nTotalTimeXML/(double)1000 +
                         " sec");
      System.err.println("XML Time: " + nTotalTimeXML/(double)nIterations + " ms");
      System.err.println("XML Size: " + nSizeXML + " chars");
      System.err.println("XML Unit: " + nTotalTimeXML/(double)nIterations/nSizeXML * 1000000 +
                         " ns/char");

      //--- SOAP test

      marshaller = new SOAPMarshaller(new InvocationContext(Repository.getMetadata()));

      for (int i = 0; i < nWarmup; ++i)
      {
         marshaller.serialize(req, writer);
      }

      lStartTime = System.currentTimeMillis();
     
      for (int i = 0; i < nIterations; ++i)
      {
         counterArray[0] = 0;
         marshaller.serialize(req, writer);
      }

      lEndTime = System.currentTimeMillis();
      long nSizeSOAP = counterArray[0];
      long nTotalTimeSOAP = lEndTime - lStartTime;
View Full Code Here

      StringWriter xmlOut = new StringWriter();
      StringWriter soapOut = new StringWriter();
     
      new XMLMarshaller(new InvocationContext(Repository.getMetadata()), Repository.getMetadata())
             .serialize(req, xmlOut);
      new SOAPMarshaller(new InvocationContext(Repository.getMetadata())).serialize(req, soapOut);

      System.err.println("XML vs. SOAP Unmarshaller Profiling Comparison");

      // --- XML test
View Full Code Here

TOP

Related Classes of nexj.core.rpc.soap.SOAPMarshaller$PrimitiveMarshaller

Copyright © 2018 www.massapicom. 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.