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 org.apache.axis.utils.Admin 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 server-config.wsdd in the current directory, deploying the service(s) from the file deploy.wsdd. The copy of server-config.wsdd from axis.jar 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" /> 
         <pathelement location="${build.dir}/classes"/> 
         <path refid="axis.classpath"/> 

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/" 
        <parameter name="attachments.implementation" 
            <handler type="java:org.apache.axis.handlers.JWSHandler"> 
                <parameter name="scope" value="session"/> 
            <handler type="java:org.apache.axis.handlers.JWSHandler"> 
                <parameter name="scope" value="request"/> 
                <parameter name="extension" value=".jwr"/> 

FrontPage/Axis/StaticDeployment (last edited 2009-09-20 22:48:13 by localhost)