2 Replies Latest reply on May 19, 2008 12:27 AM by (victor_seidor)

    Error processing form submission

      By the way sorry for my english.<br /><br />Im developing an application that uses forms. Im using XML + XDP to generate a pdf and then im using java api to process that form.<br /><br />When i try to use <br /><br />PDFContent content = new PDFContent();<br />FormsServiceClient formsClient = new FormsServiceClient(<br />                         getServiceClientFactory());<br />Document formData = new Document(pdf);//pdf is a byte[]<br />RenderOptionsSpec processSpec = new RenderOptionsSpec();<br />               processSpec.setLocale("es_ES");<br /><br />FormsResult formOut = formsClient.processFormSubmission(formData,     "CONTENT_TYPE=application/vnd.adobe.xdp+x ml","", processSpec);<br /><br />I receive an error like this:<br /><br />com.adobe.livecycle.formsservice.exception.FormServerException: Parse error on document: DataSets error: Parse error on document: FSRequest error: Content in preface not allowed.<br />     at com.adobe.formServer.DataSets.<init>(DataSets.java:175)<br />     at com.adobe.formServer.FSRequest.getDataSets(FSRequest.java:1028)<br />     at com.adobe.formServer.RunTimeContext.commonInit(RunTimeContext.java:389)<br />     at com.adobe.formServer.RunTimeContext.<init>(RunTimeContext.java:322)<br />     at com.adobe.formServer.FormServer.doProcessFormSubmission(FormServer.java:362)<br /><br />I try to find this error in documentation but seems im first person with this problem. Any tip will be very apreciated.<br /><br />Thks in advance.
        • 1. Re: Error processing form submission
          Jasmin Charbonneau Level 4
          Does the 'pdf' variable contain the whole PDF or just the XDP+XML?

          Jasmin
          • 2. Re: Error processing form submission
            Level 1
            The pdf variable contains a byte array with pdf content. I will paste some code to explain.<br /><br />I have a form on my disk and i use FileUtils.readFileToByteArray(new File("<forms_name>")) to read it.<br /><br />Then i use FormsService with Java Api method<br /><br />======================================================================<br /><br />FormsServiceClient formsClient = new FormsServiceClient(<br />                         getServiceClientFactory());<br />Document formData = new Document(pdf);<br /><br />RenderOptionsSpec processSpec = new RenderOptionsSpec();<br />processSpec.setLocale("es_ES");<br /><br />               FormsResult formOut = formsClient.processFormSubmission(formData,                    "CONTENT_TYPE=application/ vnd.adobe.xdp+xml", "",<br />                         processSpec);<br />======================================================================<br /><br />And when processFormSubmission is invoked throws exception <br /><br />com.adobe.livecycle.formsservice.exception.FormServerException: Parse error on document: DataSets error: Parse error on document: FSRequest error: Content in preface not allowed.<br /><br />Thank you.