3 export CATALINA_HOME
=/var
/tomcat-4.1
.27
4 export AXIS_HOME
=/var
/tomcat-4.1
.27/axis-1_1
5 export CLASSPATH
=$AXIS_HOME/lib
/axis.jar
:$AXIS_HOME/lib
/commons-discovery.jar
:$AXIS_HOME/lib
/commons-logging.jar
:$AXIS_HOME/lib
/jaxrpc.jar
:$AXIS_HOME/lib
/saaj.jar
:$AXIS_HOME/lib
/log4j-1.2
.4.jar
:$AXIS_HOME/lib
/wsdl4j.jar
:$CATALINA_HOME/webapps
/axis
/WEB-INF
/classes
7 name
="PluginFinderService"
9 pkg_dir
=$CATALINA_HOME/webapps
/axis
/WEB-INF
/classes
/org
/mozilla
/pfs
11 echo "Copying Source..."
16 echo "Compiling Source..."
17 javac
-g $pkg_dir/*.java
19 echo "Generating WSDL..."
20 java org.apache.axis.wsdl.Java2WSDL
-o $name.wsdl \
21 -l"http://localhost:8080/axis/services/$name" \
22 -n "urn:$name" -p"$pkg" "urn:$name" $pkg.
$name
24 echo "Generating Stubs from WSDL..."
25 rm -f org
/mozilla
/pfs
/*.
*
26 java org.apache.axis.wsdl.WSDL2Java
-o .
-s -S true
-Nurn:$name $pkg $name.wsdl
28 # make our PluginFinderService.java looking the SoapBindingImpl syntax and replace
29 cp $name.java
$name.temp
30 regexp
="s/$name/${name}SoapBindingImpl/g"
31 sed -e $regexp $name.temp
> $name.temp2
34 regexp
="s/public class ${name}SoapBindingImpl/public class ${name}SoapBindingImpl implements ${pkg}.${name}/g"
35 sed -e "$regexp" $name.temp2
> $name.temp
37 mv $name.temp org
/mozilla
/pfs
/${name}SoapBindingImpl.java
40 cp org
/mozilla
/pfs
/* $pkg_dir/
43 echo "Deploying Web Service..."
44 java org.apache.axis.client.AdminClient
-p 8080 $pkg_dir/deploy.wsdd
46 echo "All Done. Hoorah!"