Help with Java servlet error - LiveCycle Quickstart HandleData

Mark_Lindberg

05-11-2008

Greetings:

I am really struggling trying to get the LiveCycle Quickstart Servlet example working. I am encountering this error: "com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: java.lang.IllegalStateException".

This is occuring on this command:

"FormsResult formOut = formsClient.processFormSubmission(formData, "CONTENT_TYPE=application/pdf&CONTENT_TYPE=application/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "", processSpec);"



I am including the output from my print statements as well as the first portion of the source code. This is being built in Eclipse, and deployed on a LiveCycle JBoss server.

One difference is the use of SOAP instead of EJB.



Any help or ideas are greatly appreciated.

Thank You

Mark



OUTPUT:

2008-10-31 01:00:05,375 INFO [STDOUT] Entered doPost

2008-10-31 01:00:05,375 INFO [STDOUT] line1

2008-10-31 01:00:05,375 INFO [STDOUT] line2

2008-10-31 01:00:05,406 INFO [STDOUT] line3

2008-10-31 01:00:05,406 INFO [STDOUT] line4

2008-10-31 01:00:05,422 INFO [STDOUT] line5

2008-10-31 09:55:36,818 INFO [STDOUT] formData Length: 588856

2008-10-31 09:55:36,818 INFO [STDOUT] formData getContentType: null

2008-10-31 09:55:36,818 INFO [STDOUT] formData listAttributes: []

2008-10-31 09:55:36,818 INFO [STDOUT] formData getClass: class com.adobe.idp.Document

2008-10-31 09:55:36,818 INFO [STDOUT] req. Length: 588856

2008-10-31 09:55:36,818 INFO [STDOUT] req. getContentType(): application/pdf

2008-10-31 09:55:36,818 INFO [STDOUT] req. getAuthType(): null

2008-10-31 09:55:36,818 INFO [STDOUT] req. getPathInfo(): null

2008-10-31 09:55:36,834 INFO [STDOUT] line6



CODE (snip):

public void doPost(HttpServletRequest req, HttpServletResponse resp)

throws ServletException, IOException {

System.out.println("Entered doPost");



try{

PrintWriter pp = resp.getWriter();

System.out.println("line1");

//Set connection properties required to invoke LiveCycle ES

Properties ConnectionProps = new Properties();

//ConnectionProps.setProperty("DSC_DEFAULT_EJB_ENDPOINT", "jnp://localhost:1099");

ConnectionProps.setProperty("DSC_DEFAULT_EJB_ENDPOINT", "http://localhost:8080");

//ConnectionProps.setProperty("DSC_TRANSPORT_PROTOCOL","EJB");

ConnectionProps.setProperty("DSC_TRANSPORT_PROTOCOL","SOAP");

ConnectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");

ConnectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator");

ConnectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");

System.out.println("line2");

//Create a ServiceClientFactory object

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);

System.out.println("line3");

//Create a FormsServiceClient object

FormsServiceClient formsClient = new FormsServiceClient(myFactory);

System.out.println("line4");

//Get Form data to pass to the processFormSubmission method

Document formData = new Document(req.getInputStream());

System.out.println("line4a");

formData.passivate(); // save all data supplied by the input stream

//InputStream is = new FileInputStream(req.getInputStream());

//Document formData = new Document(is);

System.out.println("line5");

System.out.println("formData Length: " + formData.length());

System.out.println("formData getContentType: " + formData.getContentType());

System.out.println("formData listAttributes: " + formData.listAttributes());

System.out.println("formData getClass: " + formData.getClass());

System.out.println("req. Length: " + req.getContentLength());

System.out.println("req. getContentType(): " + req.getContentType());

System.out.println("req. getAuthType(): " + req.getAuthType());

System.out.println("req. getPathInfo(): " + req.getPathInfo());

//Set run-time options

RenderOptionsSpec processSpec = new RenderOptionsSpec();

pro