These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

send the Attachment in PDF file using WSDL to LiveCycle server

manish.lc82
Registered: Dec 27 2009
Posts: 3

Hi ALL,

In LiveCycle 8.2.1 , i had created a wokkflow to convert a document to PDF and storing it to some location on the server itself( by using writedata operation).
work fine for watch folder end point( to confirm that there is no errors in workflow)

Now, i had one input type variable inDoc(as Document)

i want to send the attached document in PDF file through WSDL to the LiveCycle server by creating Data Connection in Designer (http://servername:port/soap/services/[servicename]?wsdl).

Now i had attach the document( .txt for example) by following command in button's click event:

form1.#subform[0].Button1[0]::click - (JavaScript, client)

var myDoc= event.target;
myDoc.importDataObject("file");

in data connection i see four text fields for input document ( contentType,BinaryData,attachmentID,remoteURL) dragged only contentType and BinaryData TextFields on the page.

also dragged the invoke button (invokeBtn) which is now in invisible mode.

i used the following script to retrive the data form the attachment and try to send it to livecycle input variable(indoc).

form1.#subform[0].Button1[1]::click - (JavaScript, client)

var myDoc= event.target;
var con = myDoc.getDataObjectContents("file");
var cFile = util.stringFromStream(con , "utf-8");
// assigning data to textfield dragged form data connection
binaryData.rawValue=cFile;

invokeBtn.execEvent("click");

Before excuting the above command i had supplied value for contentType as well to 'application/msword'.

Now i went back to the workbench and saw (in recordings) that document had been recieved from the pdf file as mentioned above.
However, as you can noticed that i had converted the binary data to simple string before sending it to server, so the characters in the document are altogether diffrent( as it would be treating it a binary data and converting them again to some different format)
i did so as i was unable to send the binary stream directly using binaryData(since its a textfield and we can't assign binary data to it.)

However, i'm getting the following error:

2009-12-27 22:11:37,043 INFO [org.apache.axis.EXCEPTIONS] AxisFault:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker.java:367)
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:157)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:342)

Kindly suggest me on it as i had to send the attachment from the PDF file as an input variable using LiveCycle WSDL.

Regards,
Manish

My Product Information:
LiveCycle Designer, Windows
manish.lc82
Registered: Dec 27 2009
Posts: 3
I had found another way of achieving the above where i'm only using the javascript(i.e. No Data connection wizard).


form1.#subform[0].Button1[0]::click – (JavaScript, client)

var myDoc= event.target;
myDoc.importDataObject(”file”);

--------------


form1.#subform[0].Button1[0]::click - (JavaScript, client)
///
var myDoc= event.target;
var con = myDoc.getDataObjectContents("file");
var myProxy = SOAP.connect("http://10.10.129.176:8080/soap/services/Webservices?wsdl");
var myObject = {soapType: "SOAP-ENC:base64" ,soapAttachment: true,soapValue: con};
var result = myProxy.invoke({doc:myObject});
console.println("Result is " + result);
-----------------------------------------------
"doc" refer to the variable used in workbench an a input variable of type document.
"invoke" is a method in it.
However if try to do the same for input type varibles (xsd:int) or (xsd:string) by making any other services then it works fine.

However, when i try to attach the document then i get the following error in acroabt debeggur:
SOAPError: No such operation 'invoke'
SOAP.request:1:XFA:form1[0]:#subform[0]:Button1[0]:click

above error comes if change the type from soapType: "SOAP-ENC:base64" to "impl:BLOB"

Further i removed soapAttachment: true from myObject and i got the following error:

SOAPError: The input BLOB object should have attachmentID, remoteURL, or binaryData field specified.
SOAP.request:1:XFA:form1[0]:#subform[0]:Button1[0]:click

which gives me a sense that almost everything here is fine but somewhere somethings is missing.

Kindly suggest what i'm missing in both the methods.

Regards,
Manish