<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LiveCycle Blog</title>
	<atom:link href="http://blogs.adobe.com/livecycleblog/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.adobe.com/livecycleblog</link>
	<description>Leveraging Adobe LiveCycle - Air, Flex, ColdFusion</description>
	<lastBuildDate>Wed, 21 Jul 2010 15:58:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Invoking Output Service (transformPDF) via SOAP</title>
		<link>http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf_2.html</link>
		<comments>http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf_2.html#comments</comments>
		<pubDate>Fri, 01 Aug 2008 14:12:38 +0000</pubDate>
		<dc:creator>Allen Levine</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Output Service]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf_2.html</guid>
		<description><![CDATA[This tutorial provides a simple example of how to call a LiveCycle service from ColdFusion using SOAP. The article specifically calls the transFormPDF method of the OutputService, however provides the basics for calling any service. Normally the preferred method of invoking LiveCycle services from ColdFusion is probably using the EJB, sometimes this can be difficult [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial provides a simple example of how to call a LiveCycle service from ColdFusion using SOAP. The article specifically calls the transFormPDF method of the OutputService, however provides the basics for calling any service. </p>
<p>Normally the preferred method of invoking LiveCycle services from ColdFusion is probably using the EJB, sometimes this can be difficult and SOAP provides a simple solution, although not the most robust. </p>
<p>Using the SOAP enoint requires knowledge of the specific WSDL file for the desired service. A list of WSDL file locations can be found <a href="http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/html/wwhelp.htm?context=help&amp;file=000885.html" target="_blank">here</a>. </p>
<p>transformPDF.cfm <br />&lt;!&#8212; Change OutputServiceURL to match your environment &#8212;&gt; <br />&lt; cfset OutputServiceURL = &quot;http://127.0.0.1:8080/soap/services/OutputService?wsdl&quot;&gt; </p>
<p>&lt;!&#8212; Change SourceFileName to point to a PDF Form &#8212;&gt; <br />&lt;cfset SourceFileName = &quot;C:\Temp\Test.pdf&quot;&gt; </p>
<p>&lt;!&#8212; Convert the PDF Form to Binary, BASE64 &#8212;&gt; <br />&lt;cffile action=&quot;READBINARY&quot; file=&quot;#SourceFileName#&quot; variable=&quot;sourcePDF&quot;&gt; <br />&lt;cfset binaryData = ToBase64(sourcePDF, &quot;iso-8859-1&quot;)&gt; </p>
<p>&lt;cfoutput&gt;<br />&lt;CFSAVECONTENT VARIABLE=&quot;SoapRequestXML&quot;&gt; <br />&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;<br />&lt;SOAP-ENV:Body&gt;<br />&lt;m:transformPDF xmlns:m=&quot;http://adobe.com/idp/services&quot;&gt;<br />&lt;m:inPdfDoc&gt;<br />&lt;m:contentType&gt;String&lt;/m:contentType&gt;<br />&lt;m:binaryData&gt;#binaryData#&lt;/m:binaryData&gt;<br />&lt;m:attachmentID&gt;String&lt;/m:attachmentID&gt;<br />&lt;m:remoteURL&gt;String&lt;/m:remoteURL&gt;<br />&lt;/m:inPdfDoc&gt;<br />&lt;m:transformationFormat&gt;PDF&lt;/m:transformationFormat&gt;<br />&lt;m:pdfaRevisionNumber&gt;Revision_1&lt;/m:pdfaRevisionNumber&gt;<br />&lt;m:pdfaAmendment&gt;String&lt;/m:pdfaAmendment&gt;<br />&lt;m:pdfaConformance&gt;A&lt;/m:pdfaConformance&gt;<br />&lt;/m:transformPDF&gt;<br />v/SOAP-ENV:Body&gt;<br />&lt;/SOAP-ENV:Envelope&gt;<br />&lt;/CFSAVECONTENT&gt; <br />&lt;/cfoutput&gt; </p>
<p>&lt;!&#8212; Invoke the Web Service &#8212;&gt;<br />&lt;cfhttp url=&quot;#OutputServiceURL#&quot; method=&quot;POST&quot; username=&quot;administrator&quot; password=&quot;password&quot;&gt;<br />&lt;cfhttpparam type=&quot;CGI&quot; name=&quot;SOAPAction&quot; value=&quot;transformPDF&quot;&gt;<br />&lt;cfhttpparam type=&quot;XML&quot; name=&quot;transformPDFRequest&quot; value=&quot;#SoapRequestXML#&quot;&gt;<br />&lt;/CFHTTP&gt; </p>
<p>&lt;!&#8212; Parse the Result &#8212;&gt;<br />&lt;cfset SoapResponseXML = #cfhttp.filecontent#&gt;<br />&lt;cfset SoapResponseXML = xmlParse(SoapResponseXML)&gt;<br />&lt;cfset theRoot = SoapResponseXML.XmlRoot&gt;<br />&lt;cfset readerEnabledPDF = &#8216;#theRoot.XmlChildren[1].XmlChildren[1].XmlChildren[1][&quot;remoteURL&quot;].XmlText#&#8217;&gt; </p>
<p>&lt;cfoutput&gt;<br />&lt;a href=&quot;#readerEnabledPDF#&quot; target=&quot;_blank&quot;&gt;Transformed PDF&lt;/a&gt;<br />&lt;/cfoutput&gt; </p>
<p>You can also download the source here <a href="http://blogs.adobe.com/livecycleblog/assets/transformPDF.txt" target="_blank">Download Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf_2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Invoking Output Service (transformPDF) via EJB</title>
		<link>http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf.html</link>
		<comments>http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf.html#comments</comments>
		<pubDate>Fri, 01 Aug 2008 13:45:43 +0000</pubDate>
		<dc:creator>Allen Levine</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Output Service]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf.html</guid>
		<description><![CDATA[This sample provides the basics for invoking the transformPDF method of the LiveCycle OutputService. This sample assumes you are using LiveCycle on Jboss. If you are using a different Java server, you will need to modify a few paramaters, but the basics are the same. The transformPDF service transforms a interactive PDF (PDF Form) to [...]]]></description>
			<content:encoded><![CDATA[<p>This sample provides the basics for invoking the transformPDF method of the LiveCycle OutputService. </p>
<p>This sample assumes you are using LiveCycle on Jboss. If you are using a different Java server, you will need to modify a few paramaters, but the basics are the same. </p>
<p>The transformPDF service transforms a interactive PDF (PDF Form) to a non-interactive PDF. </p>
<p><strong>Environment Setup</strong><br />1. Copy the following required jar files from your LiveCycle Installation to your {ColdFusion Install Directory}\wwwroot\WEB-INF\lib.<br />jbossall-client.jar [C:\Adobe\LiveCycle8\jboss\client]<br />adobe-utilities.jar [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\jboss]<br />adobe-output-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common]<br />adobe-usermanager-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common]<br />adobe-livecycle-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common] </p>
<p>2. Restart ColdFusion Application Service </p>
<p>transformPDF_EJB.cfm<br />&lt;!&#8212;<br />Modify these three variables to match your environment<br />** Be sure the fileInput is a PDF Form<br />&#8212;&gt; <br />&lt;cfset EJB_ENDPOINT = &quot;jnp://68.175.120.115:1099&quot;&gt;<br />&lt;cfset fileInput = &quot;C:\temp\test.pdf&quot;&gt;<br />&lt;cfset fileOutput = &quot;C:\temp\output.pdf&quot;&gt;</p>
<p>&lt;cfscript&gt;<br />// Create ServiceClientFactoryProperties<br />serviceClientFactoryProperties = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties&quot;);<br />connectionProps = CreateObject(&quot;java&quot;,&quot;java.util.Properties&quot;).init();<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, EJB_ENDPOINT);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL, serviceClientFactoryProperties.DSC_EJB_PROTOCOL);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_SERVER_TYPE, &quot;Jboss&quot;);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, &quot;administrator&quot;);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, &quot;password&quot;);<br />&lt;/cfscript&gt; </p>
<p>&lt;cfscript&gt;<br />// Initialize ServiceClientFactory with serviceClientFactoryProperties<br />myFactory = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.dsc.clientsdk.ServiceClientFactory&quot;).createInstance(connectionProps);</p>
<p>// Initialize FileInputStream with fileInput Variable<br />fileInputStream = CreateObject(&quot;java&quot;,&quot;java.io.FileInputStream&quot;).init(fileInput);</p>
<p>// Initialize OutputClient with ServiceClientFactory properties<br />outClient = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.output.client.OutputClient&quot;).init(myFactory);</p>
<p>// Set inPDF Document<br />inPDF = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.Document&quot;).init(fileInputStream);</p>
<p>// Set outPDF Document For Result Handling<br />outPDF = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.Document&quot;);</p>
<p>// transformPDF Parameter Settings: You can avoid these properties and simply cast nulls as in the commented invoke below<br />TransformationFormat = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.output.client.TransformationFormat&quot;);<br />PDFARevisionNumber = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.output.client.PDFARevisionNumber&quot;);<br />PDFAConformance = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.output.client.PDFAConformance&quot;);</p>
<p>// Initiate The transformPDF Method<br />outPDF = outClient.transformPDF(inPDF,TransformationFormat.PDF,PDFARevisionNumber.Revision_1,&quot;&quot;,PDFAConformance.A);<br />// If you want to use null make sure you JavaCast<br />//outPDF = outClient.transformPDF(inPDF,TransformationFormat.PDF,JavaCast( &quot;null&quot;, 0 ),&quot;&quot;,JavaCast( &quot;null&quot;, 0 ));</p>
<p>// Initialize FileOutputStream with fileOutput Variable<br />fileOutputStream = CreateObject(&quot;java&quot;,&quot;java.io.File&quot;).init(fileOutput);</p>
<p>// Write The File&#8230;<br />outPDF.copyToFile(fileOutputStream);<br />&lt;/cfscript&gt; </p>
<p>You can also download the source here <a href="http://blogs.adobe.com/livecycleblog/assets/transformPDF_EJB.txt" target="_blank">Download Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/livecycleblog/2008/08/invoking_output_service_transf.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Invoking Forms Service (renderPDFForm) via EJB</title>
		<link>http://blogs.adobe.com/livecycleblog/2008/08/invoking_forms_service_renderp.html</link>
		<comments>http://blogs.adobe.com/livecycleblog/2008/08/invoking_forms_service_renderp.html#comments</comments>
		<pubDate>Fri, 01 Aug 2008 13:40:03 +0000</pubDate>
		<dc:creator>Allen Levine</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Forms Service]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/livecycleblog/2008/08/invoking_forms_service_renderp.html</guid>
		<description><![CDATA[This sample provides the basics for invoking the renderPDFForm method of the LiveCycle FormsService. This sample assumes you are using LiveCycle on Jboss. If you are using a different Java server, you will need to modify a few paramaters, but the basics are the same. Environment Setup 1. Copy the following required jar files from [...]]]></description>
			<content:encoded><![CDATA[<p>This sample provides the basics for invoking the renderPDFForm method of the LiveCycle FormsService. </p>
<p>This sample assumes you are using LiveCycle on Jboss. If you are using a different Java server, you will need to modify a few paramaters, but the basics are the same. </p>
<p><strong>Environment Setup</strong> <br />1. Copy the following required jar files from your LiveCycle Installation to your {ColdFusion Install Directory}\wwwroot\WEB-INF\lib. <br />jbossall-client.jar [C:\Adobe\LiveCycle8\jboss\client] <br />adobe-utilities.jar [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\jboss] <br />adobe-output-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common] <br />adobe-usermanager-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common] <br />adobe-livecycle-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common] <br />adobe-forms-client [C:\Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common] </p>
<p>2. Restart ColdFusion Application Service </p>
<p>renderForm_EJB.cfm <br />&lt;!&#8212; <br />Modify these three variables to match your environment <br />** Be sure the fileInput is a PDF Form XDP <br />&#8212;&gt; </p>
<p>&lt;cfset EJB_ENDPOINT = &quot;jnp://68.175.120.115:1099&quot;&gt; </p>
<p>&lt;!&#8212; Document Parameters &#8212;&gt;<br />&lt;cfset inXDP = &quot;CAR.xdp&quot;&gt; &lt;!&#8211; PDF Form File Name Source: Do Not Include Path Info &#8212;&gt;<br />&lt;cfset inXML = &quot;C:\temp\CAR.xml&quot;&gt;<br />&lt;cfset outPDF = &quot;C:\temp\CAR1.pdf&quot;&gt; </p>
<p>&lt;!&#8212; URLSpec Parameters &#8212;&gt;<br />&lt;cfset applicationWebRoot = &#8221;&gt;<br />&lt;cfset targetURL = &#8221;&gt;<br />&lt;cfset contentRootURI = &#8216;C:\Adobe\forms\&#8217;&gt; &lt;!&#8212; The Directory of the inXDP file located on the LiveCycle installed server &#8212;&gt;<br />&lt;cfset baseURL = &#8221;&gt; </p>
<p>&lt;cfscript&gt; <br />// Create ServiceClientFactoryProperties <br />serviceClientFactoryProperties = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties&quot;);<br />connectionProps = CreateObject(&quot;java&quot;,&quot;java.util.Properties&quot;).init();<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, EJB_ENDPOINT);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL, serviceClientFactoryProperties.DSC_EJB_PROTOCOL);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_SERVER_TYPE, &quot;Jboss&quot;);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, &quot;administrator&quot;);<br />connectionProps.setProperty(serviceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, &quot;password&quot;); </p>
<p>// Initialize ServiceClientFactory with serviceClientFactoryProperties<br />myFactory = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.dsc.clientsdk.ServiceClientFactory&quot;).createInstance(connectionProps); </p>
<p>// Initialize OutputClient with ServiceClientFactory properties<br />formsClient = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.formsservice.client.FormsServiceClient&quot;).init(myFactory); </p>
<p>// Initialize FileInputStream with fileInput Variable<br />inXML_FileInputStream = CreateObject(&quot;java&quot;,&quot;java.io.FileInputStream&quot;).init(inXML); </p>
<p>// Set inPDF Document <br />inXML = CreateObject(&quot;java&quot;,&quot;com.adobe.idp.Document&quot;).init(inXML_FileInputStream); </p>
<p>PDFFormRenderSpec = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.formsservice.client.PDFFormRenderSpec&quot;).init();<br />PDFVersion = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.formsservice.client.PDFVersion&quot;);<br />PDFFormRenderSpec.setPDFVersion(PDFVersion.PDFVersion_1_5); </p>
<p>// Create URLSpec Object<br />URLSpec = CreateObject(&quot;java&quot;,&quot;com.adobe.livecycle.formsservice.client.URLSpec&quot;).init();<br />URLSpec.setApplicationWebRoot(applicationWebRoot);<br />URLSpec.setContentRootURI(contentRootURI);<br />URLSpec.setTargetURL(targetURL);</p>
<p>// Initiate The renderPDFForm Method<br />FormsResult = formsClient.renderPDFForm(inXDP,inXML,PDFFormRenderSpec,URLSpec,JavaCast( &quot;null&quot;, &quot;&quot; ));</p>
<p>// Set outPDF Document For Result Handling<br />FormsResultPDF = FormsResult.getOutputContent();</p>
<p>// Initialize FileOutputStream with fileOutput Variable<br />fileOutputStream = CreateObject(&quot;java&quot;,&quot;java.io.File&quot;).init(outPDF);</p>
<p>FormsResultPDF.copyToFile(fileOutputStream);<br />&lt;/cfscript&gt; </p>
<p>You can also download the source here <a href="http://blogs.adobe.com/livecycleblog/assets/renderForm_EJB.txt" target="_blank">Download Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/livecycleblog/2008/08/invoking_forms_service_renderp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

