1 Reply Latest reply on Apr 29, 2011 5:08 AM by Hodmi

    Invoke a Process Over HTTP using a Document

    Aditya S. Level 1

      I have created a servlet to accept a PDF submission and invoke a process by passing the same PDF, using an EJB endpoint. Has anyone done this? I need to know whether the InputStream needs to be serialized? if yes, how?



        • 1. Re: Invoke a Process Over HTTP using a Document
          Hodmi Level 4

          Its been a while, but I remember using the ServletUtils.getRequestBufferAsBytes to process the request object before I could create a com.adobe.idp.Document object:



          protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                      byte[] content = ServletUtils.getRequestBufferAsBytes(request);
                      Document uploadedDoc = new Document(content);