Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

com.adobe.livecycle.rca.common.utils.StringUtils

Sam205505050
Level 6
Level 6

Hi,

I want to convert Document object to byte array. For that I want to use StringUtils. I've installed LiveCycle workbence ES2 but I couldn't find it anywhere. Can you please let me know how can I get it?

8 Replies
Varun_Nohria
Level 3
Level 3

Hi Sam,

You might not get all the services in workbench corresponding to every API.

What you can do is that you can use 'execute script' service in workbench. Write a java code in this script and call the com.adobe.livecycle.rca.common.utils.StringUtils.documentToBytes(com.adobe.idp.Document document) API.

Something like byte[] ba = StringUtils.documentToBytes(patExecContext.getProcessDataDocumentValue("/process_data/@doc"));

where doc is the document variable in the process.

For using the execute script service, you can refer below link:

http://help.adobe.com/en_US/LiveCycle/9.5/WorkbenchHelp/WS92d06802c76abadb-1cc35bda128261a20dd-7ef3....

Regards,

Varun


Sam205505050
Level 6
Level 6

Thanks Varun for your input.

The main problem is I do not have jar file. What is the name of jar file and  where can I get the jar file which contains StringUtils class?

Santosh_Nangunoori
Employee
Employee

Sam

Are you on ADEP?

This class should be available in adobe-rca-client.jar

Sam205505050
Level 6
Level 6

Hi Santosh,

I'm new to LiveSycle. I am asked to create a service to convert a xdp to byte array. For that I wanted to use this jar file. But unfortunately I did not see that jar file in my installation directory where LiveCyle workbench is installed. Will it be possible for you to send me email at sumantapakira@gmail.com

Thanks for your help!

Santosh_Nangunoori
Employee
Employee

sumant

which version of LiveCycle are you using?

Log on to http://hostname:port/adminui as administrator , Click About and let me know the version of LiveCycle you are using.

This jar should be available along with the installation , based on your version of LiveCycle I can let you know where to find the jar

--Santosh

siddharthjainPM
Employee
Employee

XDP to bytearray can be done without that class too. Please see if elow is what you need.

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

string xdpPath = "C:\\Adobe\\Loan.xdp";

                FileStream fs = new FileStream(xdpPath, FileMode.Open);

                //Get the length of the file stream

                int len = (int)fs.Length;

                byte[] xdpByteArray = new byte[len];

                //Populate the byte array with the contents of the FileStream object

                fs.Read(xdpByteArray, 0, len);

Sam205505050
Level 6
Level 6

Hi Santosh,

Thanks for your reply. I'm using LC 9.5. Kindly let me know the path of the jar file.

Sam205505050
Level 6
Level 6

Hi Siddhartha,

I'm not stroring xdp in file system. In my service, I'm getting com.adobe.idp.Document object as a paramenter and this object I need to convert into byte array.

Thanks for your help.