home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wsgatsam.zip / install / installDS.bat < prev    next >
DOS Batch File  |  2003-02-24  |  3KB  |  79 lines

  1. @title Creating Datasource - IBM WebServices Gateway
  2.  
  3. @rem parameters are 1=Gateway install directory (typically C:\WebSphere\Gateway)
  4. @rem                2=WebShere node name 
  5. @rem                3=WebSphere AppServer directory (typically C:\WebSphere\AppServer)
  6. @rem                4=DB2 userid
  7. @rem                5=DB2 password
  8.  
  9. @if .%1==. goto invalidparams
  10. @if .%2==. goto invalidparams
  11. @if .%3==. goto invalidparams
  12. @if .%4==. goto invalidparams
  13. @if .%5==. goto invalidparams
  14.  
  15. @rem Check parameter 1 is a valid directory.
  16. @if EXIST %1 goto goodparam1
  17. @echo The directory %1 specified for Gateway install directory does not exist.
  18. @goto invalidparams
  19.  
  20. @rem Check parameter 3 is a valid directory.
  21. :goodparam1
  22. @if EXIST %3 goto goodparams
  23. @echo The directory %3 specified for WebSphere install directory does not exist.
  24. @goto invalidparams
  25.  
  26. @rem Parameters are good.
  27. :goodparams
  28. set NODENAME=%2
  29. set WASDIR=%3
  30. set DBUSER=%4
  31. set DBPWD=%5
  32.  
  33. @echo About to install WebServices Gateway datasource
  34. @echo Using this call to XMLConfig:
  35. @echo call %WASDIR%\bin\XMLConfig -adminNodeName %NODENAME% -import %1\install\wsgw_datasource.xml
  36. @echo      -substitute "NODE_NAME=%NODENAME%;WAS_DIR=%WASDIR%;DB_DEFAULT_USER=%DBUSER%;
  37. @echo                  DB_DEFAULT_PWD=*****;JNDI_NAME=jdbc/WSGWDB"
  38.  
  39. @call %WASDIR%\bin\XMLConfig -adminNodeName %NODENAME% -import %1\install\wsgw_datasource.xml -substitute "NODE_NAME=%NODENAME%;WAS_DIR=%WASDIR%;DB_DEFAULT_USER=%DBUSER%;DB_DEFAULT_PWD=%DBPWD%;JNDI_NAME=jdbc/WSGWDB"
  40. @if errorlevel 0 goto InstallWorked
  41.  
  42. @echo.
  43. @echo *** Warning: an error might have occurred during the installation of the WebService Gateway.
  44. @echo Please check the WSGWInstallDS.log file in the \logs subdirectory 
  45. @echo of the WebSphere Application Server directory.
  46. @echo.
  47. @echo Please also check WSGWInstallJDBC.log in the \logs subdirectory, as an 
  48. @echo earlier failure in the JDBC step of the install could have caused this failure.
  49. @echo.
  50. @echo A problem in the JDBC step could be caused by the fact that you have DB2 installed in
  51. @echo a non-default location (that is, a location other than C:\Program Files\SQLLIB).
  52. @echo In this case you will need to set up the WebServices Gateway JDBC driver and datasource by hand 
  53. @echo using the WebSphere Administrative console.   The instructions for 
  54. @echo Installing on WebSphere single-server edition for developers (AEd), 
  55. @echo in steps 1) and 2) provide details for the set up of the JDBC driver and datasource. 
  56. @echo Having done that, you should then follow the instructions on Installing the WebServices Gateway 
  57. @echo into WebSphere, to deploy the WebServices Gateway application into WebSphere. 
  58. @echo.
  59. @goto InstallFailed
  60.  
  61. :InstallWorked
  62. @echo About to recycle WebSphere Admin Server
  63. @echo Stopping WebSphere Admin Server
  64. net stop "IBM WS AdminServer 4.0"
  65. @echo Starting WebSphere Admin Server
  66. net start "IBM WS AdminServer 4.0"
  67.  
  68. :InstallFailed
  69. @goto :eof
  70.  
  71. :invalidparams
  72. @echo This command file should not be run standalone
  73. @echo Parameters are 1=Gateway install directory (typically C:\WebSphere\Gateway)
  74. @echo                2=WebShere node name 
  75. @echo                3=WebSphere AppServer directory (typically C:\WebSphere\AppServer)
  76. @echo                4=DB2 userid
  77. @echo                5=DB2 password
  78.  
  79.