Hi All,
Is it possible to call a ‘.exe’ on a windows platform to call from webMethods.I have IS on unix platform on a different server.Both the exe and webMethods IS are lying on different servers.
SO can I execute a exe from webMethods both being on separate servers?
look at this service PSUtilities.misc:makeSystemCall for calling executables. In unix you can configure remotehost to do that and in windows sharing a network folder should do the trick.
PSUtilities.misc:makeSystemCall will run a program on the IS box. As Adnan points out, network shares can let you run programs whose binaries are another box–but since this is a Windows program you want to run, this won’t work unless you have something like WINE on your Unix install.
If you want to launch the .exe on the Windows box then you’ll need some Unix-hosted mechanism to signal Windows to launch that .exe (ala remote control). I’ve not tried anything like this nor am I aware of simple utilities that would make this easy but there may be something out there to help you do the job.
If IS is running on a Unix box and a Windows .exe is available on a Windows box. You can try Java RMI. Using Mark’s code as the RMI client and the Java service as the RMI server.
IntegrationServer/packages/PSUtilities/config/PSUtilities.cnf is a sample config file which has a sample “allowedCommands” entry. The sample has an entry for running the “dir” command using the command shell.
IntegrationServer/packages/PSUtilities/pub/GEAR 6 PSUtilities Package Documentation.doc is the documentation for the package and contains a description of the “allowedCommands” property.
The source for PSUtilities.misc:makeSystemCall and supporting services, particularly PSUtilities.config:checkParameterValidity, is available.
From these items, one can determine that the allowedCommands list is a ‘*’ delimited list of strings. The “command” parameter passed to PSUtilities.misc:makeSystemCall must match one of the entries in the list exactly.
Did you run PSUtilities.config:loadPSUtilitiesConfig to reload the config, reload the PSUtilities package or restart IS after making changes to the config file? Changes to the config file won’t be reflected in execution until one of those actions is completed.