ColdFusion And LiveCycle Forms Sample

This is part 1 of this ColdFusion to LiveCycle Forms integration sample.

In this sample, the index.cfm page displays a series of basic options (form file to render, pre-population data, etc.) that will be used to pass as arguments to LiveCycle Forms. Once the form has been generated, it is then displayed to the browser. Once the form has been completed, it is then submitted to LiveCycle Forms to perform final validations, and extract the XML data. That XML data is then in turn saved to on the server for storage.

The sample is built on the LiveCycle Forms client libraries (formserver-client.jar) . From the client library, I am using the SOAPClient() object to remotely connect to an instance of LiveCycle Forms running on another Application Server. All of the “magic” happens within the LiveCycleForms.cfc.  There are three functions in this CFC: renderForm [makes a call to LiveCycle Forms via SOAP to render a form and can optionally merge XML data to pre-populate], processFormSubmission [passes the submitted form to LiveCycle Forms to execute server-side calcs, validiations etc. If the form is complete, the data is extracted and returned to ColdFusion], BinaryWriteToClient [since LiveCycle Forms deals only in byte arrays, I have included a function that will directly write the result to the browser instead of writing to the server’s disk and referencing the new file – much better performance and more scalable].

To get this sample to work, you will need the following:

  • A working instance of LiveCycle Forms (please consult the product documentation on how to determine the SOAP end point for the web service interface).
  • A working instance of ColdFusion with the following JAR files copied into the cfusion/lib folder: formserver-client.jar, um-client.jar and adobe-common.jar (these files are provided with the LiveCycle Forms install)

NOTE: Please read the comments in the CFM and CFC files for specific configuration changes that are required.

Download the sample files .

Comments Closed

3 Responses to ColdFusion And LiveCycle Forms Sample

  1. Mike Potter says:

    Cool sample… Could you show this using the XPAAJ library as well, since CF developers have access to that library for free?Mike

  2. Marcel Boucher says:

    Mike,Ben Forta already created a sample here.Please keep in mind the major difference between XPAAJ and LiveCycle Forms – LiveCycle Forms can dynamically render XML templates (XDPs) to XHTML, HTML, PDF and PDF Forms, etc. Also, LiveCycle Forms can execute server-side calcs stored in the template. Where XPAAJ is simply limited to data extraction and pre-population.