home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wsgatsam.zip / checkout.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2003-02-24  |  1KB  |  43 lines

  1. #!/bin/sh
  2. #
  3. # LFT Channel sample - IBM WebServices Gateway
  4. # checkout.sh
  5. # Parameters are:
  6. # 1: test mode (wsif, wsgw or java)
  7. # 2: WebServices Gateway dir
  8. # 3: location of xerces.jar
  9.  
  10. echo
  11.  
  12. if [ $# -eq 3 ]; then # test there are 3 arguments
  13.  
  14.   if [ -d $2 ]; then # test 2nd argument is a directory
  15.  
  16.     if [ -f $3 ]; then # test xerces.jar exists
  17.  
  18.       java -Djava.protocol.handler.pkgs=com.ibm.axis.transport -Dlft-directory=$2/clientTemp -Dlft-piFactory=com.ibm.httpr.file.FileStateManagerFactory -Dhttpr.channelStyle=process -classpath $2/lib/wsgw-samples.jar:$2/lib/wsif.jar:$2/lib/qname.jar:$2/lib/wsgwwsiflft.jar:$2/lib/wsgwwsdllft.jar:$3:$2/lib/axis.jar:$2/lib/clutil.jar:$2/lib/wsdl4j.jar:$2/lib/httpr.jar:$2/lib/activation.jar:$2/lib/jaxrpc.jar:$2/lib/commons-logging.jar services.lftfileservice.CheckOut $1 $2
  19.  
  20.     else # couldn't find xerces.jar
  21.  
  22.       echo "xerces.jar ($3) couldn't be found."
  23.       echo "xerces.jar is usually /opt/WebSphere/AppServer/lib/xerces.jar"
  24.  
  25.     fi
  26.  
  27.   else # second arg isn't a directory
  28.  
  29.     echo "The directory ($2) specified for WebServices Gateway doesn't exist."
  30.  
  31.   fi
  32.  
  33. else # user didn't pass 3 arguments
  34.  
  35.   echo "checkout.sh requires 3 parameters:"
  36.   echo "1: test mode (wsif, wsgw or java)"
  37.   echo "2: WebServices Gateway dir (no trailing /)"
  38.   echo "3: location of xerces.jar (usually /opt/WebSphere/AppServer/lib/xerces.jar)"
  39.  
  40. fi
  41.  
  42. echo
  43.