how to give a path to getFile service?

hi all,

I have multiple ISs on a single box and I am trying to use getFile service to read a file from the packages directory. Everytime I have to enter the path manually when ever I change the IS instance. Is there any service available or any other way to read the path of the file from different instances of IS and give it as an input to the getFile service.

Thanks a lot in advance.


The PSUtilities package has a service called (pass in user.dir as propertyName parameter) which will retrieve the IS directory. From there you can concat the paths to the targeted package directory to build the full path to be used by getFile. This way, you don’t have to type in the paths manually, but let your code build the paths for you. It should work for any IS instance because it gets the appropriate IS directory for that particular IS instance.

Hope this helps,

thanks a lot YLO.

If the path and the filename are always the same except that the IntegrationServer home changes, then you can use a relative path.

For example, instead of using the path C:/Program Files/webMethods6/IntegrationServer/packages/MyPackage/myfile.txt, you can simply use packages/MyPackage/myfile.txt.

  • Percio

The pub.utils:getSystemProperty built-in service was added to WmPublic with one of the Fixes to IS 6.5. Pretty sure it will be part of IS 6.5 SP2.



Reviving an old thread. We’re running both DEV and QA on the same machine but with two seperate VMs.

For some reason, when I call pub.utils:getServerProperty from dev using “user.dir”, it returns the QA path, which is really weird to me. We have different start scripts and user environments so this should not happen.

Anyone with ideas? Is there a way to change the “user.dir” for the DEV instance?



how to give the path to getFile service in Unix ,
eg. The file is in the location /dir1/dir2/abc.txt .

Did you try that path? If dir1 is a directory at the root, then the absolute path you’ve specified should work just fine.