pub.file:getFile with "File does not exist" error

Hi

I’m trying to get the file from local drive with built in service pub.file:getFile.

As the documentation states:

WmPublic. Retrieves a specified file from the local file system.
filename - String The absolute path name of the file in the local file system (for example c:\rubicon\document.xml).

So I’m putting path in the fileName field with example of: C:\Users\test\Downloads\test\test.txt.

I’ve got there three lines with text.

After running the service I’m catching an error:

com.wm.app.b2b.server.ServiceException: [ISS.0086.9256] File [C:\Users\test\Downloads\test\test.txt] does not exist
at pub.CommonUtils.checkFileExists(CommonUtils.java:533)
at pub.file.getFile(file.java:1103)
at sun.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)

Rest of fields in this service are optional so I leave them empty.

What’s wrong with this? Any ideas?

There is a config file(fileaccess.cnf) in WmPublic\config or WmRoot\config. You need to set the folders where IS can read write there.After set, remember to refresh the package.

@Ng Mike

Thanks! It helped!

Just a small correction it is in SoftwareAG\IntegrationServer\instances\default\packages\WmPublic\config and the file is fileAccessControl.cnf.

After you chage this file, save and reload the package from IS/Designer.

1 Like

Hello Everyone,

May I ask what should be the extension on getting PDF files? I am using getFile service as well. I have access on the folder where my files are located. I can get .txt files, however for .pdf, it is getting an error “does not exist”. I also tried to get it without extension but no luck. Anyone experienced this issue? (FYI, pdf I am using is nuance pdf) Thank you!

Kind regards,
Mor