Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Invoke a Process Over HTTP using a Document

Avatar

Level 7

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?

Aditya

1 Reply

Avatar

Level 8

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);

....