Package nexj.core.rpc

Examples of nexj.core.rpc.Request


      System.err.println("Size Ratio: " + nSizeXML/(double)nSizeSOAP);
   }
     
   public static void profileUnmarshaller() throws MarshallerException, IOException
   {
      Request req = new Request();
      List instanceList = new ArrayList();
      int nIterations = 0xffff;
      int nWarmup = nIterations * 4; // 80%
      int nSizeMultiplier = 5; // ~50k chars
     
      for (int i = 0; i < nSizeMultiplier; ++i)
      {
         // create argument transfer object
         req.addInvocation(sizedTransferObject("arg", i, nSizeMultiplier), new Pair("pair" + i));

         // create filter transfer object
         // (don't reuse arg because SOAP can map same object to multiple places,
         //  XML can't and hence scews results)
         req.addFilter(sizedTransferObject("filter", i, nSizeMultiplier));

         // create instance transfer object
         // (don't reuse arg because SOAP can map same object to multiple places,
         //  XML can't and hence skews results)
         instanceList.add(sizedTransferObject("instance", i, nSizeMultiplier));
      }

      TransferObject instancesFilter = new TransferObject();
      instancesFilter.setValue("instances", instanceList);
      req.addFilter(instancesFilter);

      StringWriter xmlOut = new StringWriter();
      StringWriter soapOut = new StringWriter();
     
      new XMLMarshaller(new InvocationContext(Repository.getMetadata()), Repository.getMetadata())
View Full Code Here

TOP

Related Classes of nexj.core.rpc.Request

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.