The following examples demonstrate how to install an application in the WebSphere Application Server V4 and V5:
call syscalls 'ON' signal on error say "FCT Test #processearfile" name. = 0 name.1 = "conversationname" name.2 = "j2eeservername" name.3 = "earfilename" val. = 0 val.1 = "API Functiontest" val.2 = "BBOASR4" val.3 = "/tmp/filetransfer_resolved.ear" rc = 4 i = 1 /* Generate XML Input */ do while(name.i <> '0') rc = XMLGEN("tempin" name.i val.i) if (rc == 4) then do say "FCT Test #processearfile failed while XMLGEN" exit end i = i+1 end; /* Call the function: processearfile */ rc = CB390CFG("-action 'processearfile' -xmlinput 'inputprocessearfile.xml' -input 'tempin' -output 'processearfile'") if (rc == 4) then do say "FCT Test #processearfile failed" exit end /* Parse the result */ rc = XMLPARSE("processearfile" "ALL") if (rc == 4) then do say "FCT Test #processearfile failed while XMLPARSE" exit end say "FCT Test #processearfile completed" return 0 exit error: say "Error in FCT Test #processearfile" rc "at line" sigl say sourceline(sigl) exit
The command sequence given below accomplishes approximately the same thing as the V4 SMAPI commands.
$WAS_ROOT/AppServer/bin:> ./wsadmin.shWhen the wsadmin scripting tool successfully starts, you see a message similar to the following:
WASX7209I: Connected to process "server1" on node SY1 using SOAP connector; The type of process is: UnManagedProcess WASX7029I: For help, enter: "$Help help"
wsadmin> set attrs [list -node SY1 -server server1]
wsadmin> $AdminApp install ../installableApps/filetransfer.ear $attrsWhen the application successfully installs, you see a series of messages similar to the following:
WASX7327I: Contents of was.policy file: grant codeBase "file:${application}" { permission java.security.AllPermission; }; ADMA5016I: Installation of WebSphere File Transfer Servlet Application started. ADMA5005I: Application WebSphere File Transfer Servlet Application configured in WebSphere repository ADMA5001I: Application binaries saved in /WebSphere/V5R0M0/AppServer/wstemp/Scriptf3964b86cb/workspace/cells/SY1/applications/WebSphere File Transfer Servlet Application.ear/WebSphere File Transfer Servlet Application.ear ADMA5011I: Cleanup of temp dir for app WebSphere File Transfer Servlet Application done. ADMA5013I: Application WebSphere File Transfer Servlet Application installed successfully.
wsadmin> $AdminConfig save
You can use the AdminApp taskInfo command to obtain information about each task option:
wsadmin> $AdminApp taskInfo ../installableApps/filetransfer.ear MapWebModToVHThe taskInfo command results in information similar to the following:
MapWebModToVH: Selecting Virtual Hosts for Web Modules Specify the virtual host where you want to install the Web modules contained in your application. Web modules can be installed on the same virtual host or dispersed among several hosts. WASX7348I: Each element of the MapWebModToVH task consists of the following 3 fields: "webModule", "uri", "virtualHost". Of these fields, the following may be assigned values: "virtualHost" and the following are required: "virtualHost" The current contents of the task after running default bindings are: webModule: WebSphere Admin File Transfer Application uri: filetransfer.war,WEB-INF/web.xml virtualHost: admin_host
You can use the AdminApp installInteractive command to step through all the installation tasks, one at a time. If you use the installInteractive command to successfully install an application, an option string logs in the wsadmin.traceout file under the message ID WASX7278I. You can copy and paste this option string into wsadmin scripts.