Package org.jboss.remoting.marshal

Examples of org.jboss.remoting.marshal.Marshaller


            String responseContentType = invocationResponse == null ? requestContentType : WebUtil.getContentType(invocationResponse);
            response.setContentType(responseContentType);
            //int iContentLength = getContentLength(invocationResponse);
            //response.setContentLength(iContentLength);
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            Marshaller marshaller = getMarshaller();
            marshaller.write(invocationResponse, outputStream);
            retval = outputStream.toByteArray();
            response.setContentLength(retval.length);
         }

      }
View Full Code Here


               dataOutput.write(("\r\n" + "\r\n").getBytes());

               if(methodType != null && !methodType.equals("HEAD"))
               {
                  // write response
                  Marshaller marshaller = getMarshaller();
                  marshaller.write(response, dataOutput);
               }
            }
         }
         else
         {
View Full Code Here

      Object returnValue = null;
      int invokeCount = 0;

      if (trace) { log.trace(this + "(" + (++invokeCount) + ") invoking " + invocationReq); }

      Marshaller marshaller = getMarshaller();
      UnMarshaller unmarshaller = getUnMarshaller();

      if (marshaller == null)
      {
         // try by locator (in case marshaller class name specified)
View Full Code Here

      Object returnValue = null;
      int invokeCount = 0;

      if (trace) { log.trace(this + "(" + (++invokeCount) + ") invoking " + invocationReq); }

      Marshaller marshaller = getMarshaller();
      UnMarshaller unmarshaller = getUnMarshaller();

      if (marshaller == null)
      {
         // try by locator (in case marshaller class name specified)
View Full Code Here

         {
            response.setContentType(requestContentType);
            int iContentLength = getContentLength(invocationResponse);
            response.setContentLength(iContentLength);
            ServletOutputStream outputStream = response.getOutputStream();
            Marshaller marshaller = MarshalFactory.getMarshaller(HTTPMarshaller.DATATYPE, getSerializationType());
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(invocationResponse, outputStream, Version.getDefaultVersion());
            else
               marshaller.write(invocationResponse, outputStream);
            outputStream.close();
         }

      }
      catch(ClassNotFoundException e)
View Full Code Here

            String responseContentType = invocationResponse == null ? requestContentType : WebUtil.getContentType(invocationResponse);
            response.setContentType(responseContentType);
            //int iContentLength = getContentLength(invocationResponse);
            //response.setContentLength(iContentLength);
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            Marshaller marshaller = getMarshaller();
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(invocationResponse, outputStream, Version.getDefaultVersion());
            else
               marshaller.write(invocationResponse, outputStream);
            retval = outputStream.toByteArray();
            response.setContentLength(retval.length);
         }

      }
View Full Code Here

         case Version.VERSION_2:
         case Version.VERSION_2_2:
         {
            String responseContentType = responseObject == null ? req.getContentType() : WebUtil.getContentType(responseObject);
            res.setContentType(responseContentType);
            Marshaller marshaller = getMarshaller();
            if (marshaller instanceof VersionedMarshaller)
            ((VersionedMarshaller) marshaller).write(responseObject, response.getOutputStream(), version);
            else
               marshaller.write(responseObject, response.getOutputStream());
            return;
         }
         default:
         {
            throw new IOException("Can not send response due to version (" + version + ") not being supported.  Supported versions: " + Version.VERSION_1 + ", " + Version.VERSION_2 + ", " + Version.VERSION_2_2);
View Full Code Here

               dataOutput.write(("\r\n" + "\r\n").getBytes());

               if(methodType != null && !methodType.equals("HEAD"))
               {
                  // write response
                  Marshaller marshaller = getMarshaller();
                  marshaller.write(response, dataOutput);
               }
            }
         }
         else
         {
View Full Code Here

      return unmarshaller;
   }

   public Marshaller getMarshaller()
   {
      Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader());

      if(marshaller == null)
      {
         marshaller = MarshalFactory.getMarshaller(getDataType(), getSerializationType());
      }
View Full Code Here

  
   private void runHttpTest(String algo)
   throws IOException, ClassNotFoundException
   {
      String datatype = "encryptedHTTP";
      Marshaller m = MarshalFactory.getMarshaller(HTTPMarshaller.DATATYPE);
      UnMarshaller u = MarshalFactory.getUnMarshaller(HTTPUnMarshaller.DATATYPE);
      EncryptingMarshaller em =  new EncryptingMarshaller(m);
      EncryptingUnMarshaller um =  new EncryptingUnMarshaller(u);
      if(algo != null)
      {
View Full Code Here

TOP

Related Classes of org.jboss.remoting.marshal.Marshaller

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.