axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wake <dw...@stanfordalumni.org>
Subject Interactively deploy/undeploy services without using files
Date Wed, 21 Jan 2004 00:56:25 GMT
Is there any way for a Java application to deploy and undeploy
services and methods interactively in Apache Axis, without writing any
files?

In Apache SOAP this was possible by using the
org.apache.soap.server.DeploymentDescriptor class.  Is there an AXIS
equivalent?

Here's an example that worked with Apache SOAP.  I would like to know
if there's a way to do the same kind of thing in Apache AXIS.

Thanks,

David

/** Deploy a new operation MY_METHOD */
smc = new ServiceManagerClient (new URL(MY_SOAP_URL));
DeploymentDescriptor dd = smc.query(MY_SOAP_SERVICE_NAME);
if (dd == null)
{
    dd = new DeploymentDescriptor();
}
dd.setID(MY_SOAP_SERVICE_NAME);
dd.setServiceType(DeploymentDescriptor.SERVICE_TYPE_RPC);
dd.setScope(DeploymentDescriptor.SCOPE_APPLICATION);
dd.setProviderType(DeploymentDescriptor.PROVIDER_USER_DEFINED);
dd.setServiceClass("my.custom.provider.class");
String[] oldMethods = dd.getMethods();
if (oldMethods == null)
{
    oldMethods = new String[0];
}
ArrayList newMethodList = new ArrayList(Arrays.asList(oldMethods));
String methodName = getName();
if (!newMethodList.contains(MY_METHOD))
{
    newMethodList.add(MY_METHOD);
}
dd.setMethods((String[])newMethodList.toArray(new String[newMethodList.size()]));
smc.deploy(dd);



Mime
View raw message