I need to be able to invoke scripts on servers that do not have WM components installed on them.
I will have the Host, port, login, pw, as well as the path and script to be executed. It will be necessary to establish a connection to the non-local server, execute the script, retrieve the success/failure status, then close the connection.
Since it is not on the same WM server, I cannot use the pub.remote.invoke commands.
Has anyone done this before? I’m leaning towards doing this in Java unless you have another suggestion.
Does the “Executer Adapter” sound familiar to anyone??? A post on Advantage.webmethods.com forum mentions that this adapter would perform shell functions on a remote box. However, I have been unable to find information on this adapter.
> I need to be able to invoke scripts on servers that do not
> have WM components installed on them.
I take it you want to remote invoke OS-level scripts (eg: shell scripts) right? You could use secure shell (ssh) and its remote invoke options. See: [url=“http://openssh.org/”]http://openssh.org/[/url]
You’ll have to install ssh on your local machine and sshd on the remote machine. Then you setup ssh (key setup etc). Once setup, you can securely run a remote script by simply running this command on your local machine:
I think there are three approaches that would work depending on what you have installed on your AS/400.
If you can perform an HTTP post, use Rob’s suggestion. To invoke the service PostOrder in the OrderManagement folder with the parameters OrderID = 123 and OrderAmt = $300 use the following URL:
If you have Java running on your AS/400 you can generate a java client app using Developer that can invoke the PostOrder service
If you are using web services and can consume web services from your AS/400 post the appropriate SOAP message to http://:/soap. You can use Developer to browse existing IS services and generate WSDL files or sample requests if necessary. The body of the SOAP message (without the envelope) would look like this:
There are probaly a couple of other alternatives that might also be good fits depending on how your AS/400 is configured, but that should get you started.
The packages you need are all contained in the client.jar file which can be deployed to your AS/400 server. The client.jar file is found in the Integration Server’s \lib folder.
Sorry, my RPG skills are pretty rusty. I’m sure the solution involves holding the programming template card in front of the 5250 green-screen terminal though.
…which in turn invokes ssh to execute the remote
OS-level commands. To execute a local command from a WM
server, check the WM examples or the code posted in the
forums.
I’m not a sysadmin, but I understand that using ssh to
execute remote commands is a system admin ‘best practise’.
Remote monitoring tools like netsaint/nagios use it, for
example.