Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

LC ES and CF8

Avatar

Former Community Member
Does anyone have a sample of calling the LC ES Web services using CF (8 in my case). I constantly receive the error:<br /><br />Web service operation renderPDFForm with parameters {urlSpec={contentrooturi=C:\\Adobe&applicationwebroot=http://testLCserver:8080/FormsServiceClientApp&targeturl=http://testLCserver:8080/FormsServiceClientApp/HandleData},renderPDFFormResult={Undefined},pdfFormRenderSpec={com.adobe.livecycle.formsservice.client.PDFFormRenderSpec@1c2e8a4},pageCount={javax.xml.rpc.holders.LongHolder@55d1b4},attachments={null},inDataDoc={null},locale={javax.xml.rpc.holders.StringHolder@3aacb4},outRenderPDFFormResultDoc={{}},formQuery={Loan.xdp}} cannot be found.<br /><br />I have copied the following 2 jars to my lib directory:<br />adobe-forms-client.jar <br />adobe-livecycle-client.jar <br /><br />These were from the directory: Adobe\LiveCycle8\LiveCycle_ES_SDK\client-libs\common\<br /><br />I think my main issue is the blob data type, I could not find a class file in any of the jars in the sdk that defined this type. My issue could also be something in LC itself as I am brand new to the product. I am running the turnkey install on jboss, with samples installed.<br /><br />Here is the code I have thus far (hope it formats ok):<br />><cftry><br /> <cfscript><br /> serviceProxy = createObject("webservice", "http://testLCserver:8080/soap/services/FormsService?wsdl"); <br /> serviceProxy.setUserName( "administrator" );<br /> serviceProxy.setPassword("password");<br /> formQuery = "Loan.xdp"; <br /> renderAtClient = createObject("java", "com.adobe.livecycle.formsservice.client.RenderAtClient").yes;<br /> PDFFormRenderSpec = createObject("java", "com.adobe.livecycle.formsservice.client.PDFFormRenderSpec");<br /> PDFFormRenderSpec.setRenderAtClient(renderAtClient);<br /> URLSpec = createObject("java", "com.adobe.livecycle.formsservice.client.URLSpec");<br /> URLSpec.setApplicationWebRoot("http://testLCserver:8080/FormsServiceClientApp");<br /> URLSpec.setContentRootURI("C:\\Adobe");<br /> URLSpec.setTargetURL("http://testLCserver:8080/FormsServiceClientApp/HandleData");<br /> outRenderPDFFormResultDoc = structNew(); //createObject("java", "com.adobe.idp.services.holders.BLOBHolder");<br /> pageCount = createObject( "java", "javax.xml.rpc.holders.LongHolder").init();<br /> locale = createObject( "java", "javax.xml.rpc.holders.StringHolder").init();<br /> renderPDFFormResult = createObject("java", "com.adobe.livecycle.formsservice.client.FormsResult");<br /> </cfscript><br /> <cfinvoke <br /> webservice="#serviceProxy#"<br /> method="renderPDFForm"<br /> returnvariable="FormsResult"><br /> <cfinvokeargument name="formQuery" value="#formQuery#"/><br /> <cfinvokeargument name="inDataDoc" omit="yes"/><br /> <cfinvokeargument name="pdfFormRenderSpec" value="#PDFFormRenderSpec#"/><br /> <cfinvokeargument name="urlSpec" value="#URLSpec#"/><br /> <cfinvokeargument name="attachments" omit="yes" /><br /> <cfinvokeargument name="outRenderPDFFormResultDoc" value="#outRenderPDFFormResultDoc#"/><br /> <cfinvokeargument name="pageCount" value="#pageCount#" /> <br /> <cfinvokeargument name="locale" value="#locale#" /> <br /> <cfinvokeargument name="renderPDFFormResult" value="#renderPDFFormResult#"/><br /> </cfinvoke><br /> <cfcatch type="any"><br /> <cfdump var="#cfcatch#" /><br /> <cfoutput>serviceProxy: <br /></cfoutput><br /> <cfdump var="#serviceProxy#" /><br /> <cfoutput>formQuery: #formQuery#<br /></cfoutput><br /> <cfoutput>pdfFormRenderSpec:<br /></cfoutput><br /> <cfdump var="#pdfFormRenderSpec#"/><br /> <cfoutput><br />urlSpec:<br /></cfoutput><br /> <cfdump var="#urlSpec#"/><br /> <cfoutput>outRenderPDFFormResultDoc:<br /></cfoutput><br /> <cfdump var="#outRenderPDFFormResultDoc#"/><br /> <cfoutput>pageCount:<br /></cfoutput><br /> <cfdump var="#pageCount#"/><br /> <cfoutput>locale:<br /></cfoutput><br /> <cfdump var="#locale#"/><br /> <cfoutput>renderPDFFormResult:<br /></cfoutput><br /> <cfdump var="#renderPDFFormResult#"/><br /> </cfcatch><br /></cftry>
2 Replies

Avatar

Former Community Member
Hi, <br /><br />it's more simple than you imagine, if you call LC ES using Web Services do you not need to install any client library and, for example, to call a LC ES passing to it a BLOB with a PDF submission you can do:<br /><br /><cfscript><br /> mystruct = structnew();<br /> mystruct.username='administrator';<br /> mystruct.password='password';<br /> BLOB = structnew();<br /> BLOB['binaryData'] = getHttpRequestData().content;<br /> BLOB['contentType'] = 'application/pdf';<br /> BLOB['attachmentID'] = javacast('null','');<br /> BLOB['remoteURL'] = javacast('null','');<br /> targetUrl= 'http://';<br /> userAgent= javacast('null','');<br /> environmentBuffer = 'HTTP_REFERER=#CGI.SCRIPT_NAME#&CONTENT_TYPE=application/vnd.adobe.xdp';<br /></cfscript><br /><br /><cfscript><br /> ws2 = CreateObject("webservice", "http://192.168.91.202:8080/soap/services/mywsname?wsdl",mystruct);<br /></cfscript><br /><br /><cfscript><br /> ret = ws2.invoke(blob,environmentBuffer,javacast('null',''),javacast('null',''));<br /></cfscript><br /><br /><cfset soapreq = GetSOAPRequest(ws2)><br /><h2>SOAP Request</h2><br /><cfdump var="#soapreq#"><br /><br /><cfset soapresp = GetSOAPResponse(ws2)><br /><h2>SOAP Response</h2><br /><cfdump var="#soapresp#"><br /><br />Let me know if this can help you

Avatar

Former Community Member
I think I have larger issues... :-(

The Code:
>

mystruct = structnew();
mystruct.username='administrator';
mystruct.password='password';

> ws2 = CreateObject("webservice", "http://testLCserver:8080/soap/services/FormsService?wsdl",mystruct);


>



>


Produces the Error:
Could not initialize class com.adobe.idp.services.FormsServiceSoapBindingStub

java.lang.NoClassDefFoundError

So this may be a CF issue... will do more searching...