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
BedrockMission!

Learn More

View all

Sign in to view all badges

Error processing form submission

Avatar

15-05-2008

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+xml","", 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.

Replies

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

16-05-2008

Does the 'pdf' variable contain the whole PDF or just the XDP+XML?



Jasmin

Avatar

19-05-2008

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.