I’d like to know if there is a way using script or java programming to automate the installation of packages in Integration Server ?
I use the “install inbound” link the “manager/packages” page of the administrator, but sometimes I have too many packages to install and I’d like just to run a script using an input to specify the “.zip” file to install as wM package to the IS ?
Is there a way to do this using commands or the wM Java API ?
You can use the WmRoot/wm.server.packages:packageInstall to install your package(s).
You can write a flow service and call the same but for this you have enable the wMRoot package by giving “watt.server.ns.hideWmRoot=False” in Extended settings.
You have to place the zip files i.e. packages in the inbound folder and submit the file name to “file” variable and “activateOnInstall” variable has to be set to true to enable the packages upon installation.
What I want exactly, is to use a shell script or apache ant to call “WmRoot/wm.server.packages:packageInstall” from the command line.
I’m not sure it is possible to call a flow service by another way than a developper client.
I am not much aware of apache so cant say on that.
Using a script directly will not be feasible but you can write a java service and call the same from command line or if you want a GUI you can use dsp pages. I would suggest writing a java program.
Flow services can be called from a java program, dsp pages, developer is not the way to call a flow service.
Writing a script using a java program is what I want to do.
I suppose that the webMethods Java API can help calling “WmRoot/wm.server.packages:packageInstall”.
I’ll try to do the same for checking packages version.
A while back, one of the guys I worked with wrote an external java program that used the client.jar API to install, publish or backup packages.
The code had a props file that contained server data needed for the transaction (host, port, username, password, directories for backup, etc.) It also required a list of packages (to action against).
There is another easier way to accomplish this: You can write a flow service that wraps a call to pub.packages:installPackage. The flow could contain a loop for multiple iterations. It will require that the packages are in replicate/inbound directory.
A word of caution to you: No matter what you decide to do, always back up your server packages prior to installing any packages in case you make a mistake and overwrite existing code with OLDER code. This would occur in cases where you have worked on code, and an earlier package version resides in the replicate/inbound directory.
Many thanks to the above posts - they helped me out a lot. I have a couple of questions:
The service outputs an installCode. Is there a documented list of installCodes, their meanings and causes?
Some of our packages have been returning installCode 6 - “[packageName] package installed and activated. The original package has been moved to package recovery area.”, rather than 0 - “[packageName] package installed and activated.” My question is, why does the installCode 6 occur? What is the difference?
Can you guys pass the utility that u have developed to install packages and check their versions. I am writing a similar java based utility and it would be of great help to me.
Short, unsafe and dirty method of package installation is to unzip the packages and directly copy the whole directory to IS/Packages but if there are package dependencies on WmFlatfile or WmSAP it will not work (in my experience) and this process is no good.
I use this method all the time in Dev and Test! Also there might be some issues when you try to do the same for packages with Adapter connections or listeners.