Highlighted

Exception while merging data with XDP using FormDataIntegration

Avatar

Guest

22-05-2008

Hi All,

I am trying to merge the XML data into and XDP to create a PDF using FormDataIntegration.

But i got the following error:

com.adobe.livecycle.formdataintegration.client.ImportFormDataException: Operation aborted: malformed PDF or data.

at com.adobe.livecycle.formdataintegration.server.FormData.importData(FormData.java:89)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:181)

at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:134)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:218)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapter_jmbvky_ELOImpl.doRequiresNew(EjbTransactionBMTAdapter_jmbvky_ELOImpl.java:63

at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:133)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:80)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:113)

at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(AbstractMessageReceiver.java:298)

at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeCall(SoapSdkEndpoint.java:125)

at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke(SoapSdkEndpoint.java:77)

at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)

at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)

at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)

at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)

at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)

at javax.servlet.http.HttpServlet.service(HttpServl

Replies

Highlighted

Jasmin_Charbonn

22-05-2008

The FormDataIntegration service DOESN'T merge data with an XDP. You need to use LiveCycle Forms to do that.



FormDataIntegration only merge data with a PDF.



Jasmin
Highlighted

Avatar

Guest

22-05-2008

failed to invoke FormDataIntegration.importData



Hi Jasmin,



But when I tried to give PDF as input..I got a exception that it allows only xdp..

Hence,I changed the input to an xdp.The XDP has just two text fields,FirstName and LastName.



My functinality is simple.I want a form in the repository to be merged with the xml data and save the pdf on server.How do I customize the RenderForm for the same.

I am not using workspace.I have to invoke this service using a webservice call where the SOAP request will have the data.I have to retrieve the SOAP request data and merge it with the xdp and save it on the server's hard disk.Response should contain PDF location.Please explain me the various processes to be involved for achieving this requirement including the XPath expressions as I am new to all these technologies.

I tried using the RenderPDFForm of Forms services.Following are the properties I have used.

formUri :Sample.xdp

Target Uri:repository:///Soln.Integration/ Sample.pdf

Context Root Uri :repository:///Soln.Integration/ ,where "Soln.Integration" is a folder in the repository where the Sample.xdp is present.

But got an exception :'Cannot load template from the path'..Is this the right way to give the Uri paths.Also,how do I configure the output so that the pdf is saved on hard disk.



Regds,

Saritha Reddy
Highlighted

Jasmin_Charbonn

22-05-2008

The error you get (com.adobe.livecycle.formdataintegration.client.ImportFormDataException: Operation aborted: malformed PDF or data.) is because it wants a PDF and your providing an XDP.



I don't beleive FormDataIntegration will error with an exception that it only allows XDP. It doesn't make sense.



Anyways, LC Forms is what you want to use for creating that PDF from an XDP.



Your settings look fine. By Form URI you mean Form to Render right?



You only really need to set the Form to Render and the Content Root URI. The concatenation of the two (Form To Render + Content Root URI) should result in repository:///Soln.Integration/Sample.pdf.



Can you try to use a folder without a "." to see if it causes a problem?



Can you past the exact error your getting with the path?



The output will be saved in a document variable and you can use the Write Document operation from the File Utilities to write it to the file system.



Jasmin
Highlighted

Avatar

Guest

22-05-2008

Hi Jasmin,

I have moved the files from Soln.Integration to Samples folder.

Still I get the same error

Do i need to use the word 'respository'or the server name we give while configuring..BTW howmany '/' after repository

is it repository:/ or repository:// ??



Following is the exception:



Caused by: com.adobe.livecycle.formsservice.exception.RenderFormException: Failed to load TemplateStream for FormQuery=Sample.xdp from location URI =respository:///Samples/.

at com.adobe.formServer.Template.validate(Template.java:1167)
Highlighted

Jasmin_Charbonn

26-05-2008

Ok.



Send me a screen shot of the error, the settings on the renderPDFForm and the repository structure.



Send it to livecycle8@gmail.com.



Jasmin
Highlighted

Avatar

Guest

29-05-2008

Hello,

I am having same issue with FormDataIntegrationService, when I am using it as a web service trying to merge xml data with a pdf(XFA) form.

It throws an exception "Only XDP data is supported with XFA forms".

on dataIntClient.importData(inPDFForm, inXMLData) call.



When I use XDP template instead of PDF it comes back with malformed exception.
Highlighted

HowardTreisman

15-06-2008

All

Form Data Integration only works with PDF files, as Jasmine has indicated.

The exception you're getting is ACTUALLY telling you that you need to provide the DATA as an XDP file.

(Aside: XDP is a very flexible standard, which allows you to define both XFA forms, or xml data, or both.)



In order to wrap your XML data within the correct XDP "envelope", you can use our component here:

http://avoka.dnsalias.com/confluence/display/Public/XML+Utilities+DSC

The operation is: insertXdpEnvelope



You can download a trial (free for dev/test) here:

http://www.avoka.com/apps/checkcookie?qpac=y&qpac_code=avokaESComponents&location=%2Fapps%2Fqpacdown...



Howard

http://www.avoka.com