Q: How do I deploy a service (i.e. update the server-config.wsdd) without a running Axis server?

A: To deploy a service descriptor without a running Axis server, use the <code>org.apache.axis.utils.Admin</code> class:

    cd webapps/axis/WEB-INF 
    java -cp $AXIS_CLASSPATH org.apache.axis.utils.Admin server deploy.wsdd 

The program will create or update the <code>server-config.wsdd</code> in the current directory, deploying the service(s) from the file <code>deploy.wsdd</code>. The copy of <code>server-config.wsdd</code> from <code>axis.jar</code> will be used as the default starting config if it has to create the file.

From Ant do something like:

    <java classname="org.apache.axis.utils.Admin"  
               fork="true"  
                dir="${webapp.install}/WEB-INF"> 

      <arg value="server" /> 
      <arg value="${webapp.install}/wsdd/deploy.wsdd" /> 

      <classpath> 
         <pathelement location="${build.dir}/classes"/> 
         <path refid="axis.classpath"/> 
      </classpath> 

    </java> 

Something to Watch Out For

When I taught my ant build system to use the Admin class to generate server-config.xml I had a slight problem. The generated server-config.xml's globalConfiguration element was missing a few important entries. To fix the problem I configured the build to pass a server-config-update.xsdd file to the Admin class along with the deploy.wsdd file.

The contents of my server-config-update.wsdd are shown below:

<deployment xmlns="http://xml.apache.org/axis/wsdd/" {{{ xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

</deployment>

AxisProjectPages/StaticDeployment (last edited 2009-09-20 23:33:29 by localhost)