Search code examples
connection-stringwebmethods

WEBMethods connection string is not working?


The following WEBMethods string is not connecting to the server on our companies network drive. I can take the string and place it in a web broswer and i will get a windows exploer screen but when run from WEBMethods the error is Access is denied.

Question: What is causing the access to be denied through WEBMethods? (I can access the file through internet explorer)

Connection String: (Names change to safe guard any information) //ServerName/DriveName/S/AB/P/T

Error:

     com.wm.app.b2b.server.ServiceException: java.io.FileNotFoundException: \\espr1fs05
     \DSSXFER\SYSTEMS\ACCESS BACKUPS\Prod\Test\TBE-FILE02.txt (Access is denied)

New Code Added:

     System.out.println("outputDirectory --> " + outputDirectory);
     writer = new PrintWriter(new BufferedWriter(new FileWriter("doug.txt")));

I have the code in my Java service and would like to write to a network drive as a test.

     allowedWritePaths=//ESPR1FS05/DSSXFER/SYSTEMS/ACCESS BACKUPS/Prod/Test;
     allowedReadPaths=//ESPR1FS05/DSSXFER/SYSTEMS/ACCESS BACKUPS/Prod/Test;
     allowedDeletePaths=//ESPR1FS05/DSSXFER/SYSTEMS/ACCESS BACKUPS/Prod/Test;

The above is how the fileAccessControl.cnf file is configured and this is the same path that I put into the web service for the input file. When I test a write from Java it will work.

What could be wrong with the above write paths?

Error Statements: com.wm.app.b2b.server.ServiceException: java.io.FileNotFoundException: \ESPR1FS05\DSSXFER\SYSTEMS\ACCESS BACKUPS\Prod\Test\T.txt (Access is denied)

         com.wm.app.b2b.server.ServiceException: java.io.FileNotFoundException: 
         \\ESPR1FS05\DSSXFER\SYSTEMS\ACCESS BACKUPS\Prod\Test\T.txt (Access is denied)

Solution

  • I'm not sure but did you try reloading the WMPublic package ? Maybe the changes you made to the fileAccessControl.cnf have not been loaded into memory.

    Maybe it requires a webMethods server reboot.