org.apache.axis.client
public class AdminClient extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Call |
call
the object that represents our call
|
protected static org.apache.commons.logging.Log |
log |
protected static java.lang.String |
ROOT_UNDEPLOY
root element of the undeploy request
|
| Constructor and Description |
|---|
AdminClient()
Construct an admin client w/o a logger.
|
AdminClient(boolean ignored)
this is a somwhat contrived variant constructor, one that throws an exception
if things go wrong.
|
| Modifier and Type | Method and Description |
|---|---|
Call |
getCall()
External access to our Call
|
java.lang.String |
list()
send a list command
|
java.lang.String |
list(Options opts)
process the options then run a list call
|
static void |
main(java.lang.String[] args)
Creates in instance of
AdminClient and
invokes process(args). |
java.lang.String |
process(java.io.InputStream input) |
java.lang.String |
process(Options opts,
java.io.InputStream input)
submit the input stream's contents to the endpoint, return the results as a string.
|
java.lang.String |
process(Options opts,
java.lang.String xmlFile) |
java.lang.String |
process(java.lang.String xmlFile)
process an XML file containing a pre-prepared admin message
|
java.lang.String |
process(java.lang.String[] args)
Processes a set of administration commands.
|
java.lang.String |
process(java.net.URL xmlURL) |
void |
processOpts(Options opts)
go from the (parsed) command line to setting properties on our call object.
|
java.lang.String |
quit()
make a quit command
|
java.lang.String |
quit(Options opts)
process the command line ops, then send a quit command
|
static void |
setDefaultConfiguration(EngineConfiguration config)
If the user calls this with an EngineConfiguration object, all
AdminClients on this thread will use that EngineConfiguration
rather than the default one.
|
void |
setLogin(java.lang.String user,
java.lang.String password)
set the username and password
requires that call!=null
|
void |
setTargetEndpointAddress(java.net.URL address)
set the URL to deploy to
requires that call!=null
|
void |
setTransport(java.lang.String transportName)
set the transport to deploy with.
|
java.lang.String |
undeployHandler(java.lang.String handlerName)
undeploy a handler
|
java.lang.String |
undeployService(java.lang.String serviceName)
undeploy a service
|
protected static org.apache.commons.logging.Log log
protected Call call
protected static final java.lang.String ROOT_UNDEPLOY
public AdminClient()
System.err.
This is for 'historical reasons'public AdminClient(boolean ignored)
throws ServiceException
ignored - ServiceExceptionpublic static void setDefaultConfiguration(EngineConfiguration config)
config - the EngineConfiguration which should be usedpublic Call getCall()
Call
Call object this instance usespublic java.lang.String list(Options opts) throws java.lang.Exception
opts - java.lang.Exceptionpublic java.lang.String list()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String quit(Options opts) throws java.lang.Exception
opts - java.lang.Exceptionpublic java.lang.String quit()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String undeployHandler(java.lang.String handlerName)
throws java.lang.Exception
handlerName - name of the handler to undeployjava.lang.Exceptionpublic java.lang.String undeployService(java.lang.String serviceName)
throws java.lang.Exception
serviceName - name of servicejava.lang.Exceptionpublic java.lang.String process(java.lang.String[] args)
throws java.lang.Exception
Processes a set of administration commands.
The following commands are available:
-lurl sets the AxisServlet URL-hhostName sets the AxisServlet host-pportNumber sets the AxisServlet port-sservletPath sets the path to the
AxisServlet-ffileName specifies that a simple file
protocol should be used-uusername sets the username-wpassword sets the password-d sets the debug flag (for instance, -ddd would
set it to 3)-tname sets the transport chain touselist will list the currently deployed servicesquit will quit (???)passwd value changes the admin passwordxmlConfigFile deploys or undeploys
Axis components and web servicesIf -l or -h -p -s are not set, the
AdminClient will invoke
http://localhost:8080/axis/servlet/AxisServlet.
args - Commands to processjava.lang.Exception - Could be an IO exception, an AxisFault or something elsepublic void processOpts(Options opts) throws java.lang.Exception
opts - java.lang.Exception - if call==nullpublic void setLogin(java.lang.String user,
java.lang.String password)
user - usernamepassword - passwordpublic void setTargetEndpointAddress(java.net.URL address)
address - public void setTransport(java.lang.String transportName)
transportName - a null or empty value does not trigger a settingpublic java.lang.String process(java.io.InputStream input)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String process(java.net.URL xmlURL)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String process(java.lang.String xmlFile)
throws java.lang.Exception
xmlFile - file to loadjava.lang.Exceptionpublic java.lang.String process(Options opts, java.lang.String xmlFile) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String process(Options opts, java.io.InputStream input) throws java.lang.Exception
opts - options -can be nullinput - -input stream for requestjava.lang.Exception - if the call was nullAxisFault - if the invocation returned an empty responsepublic static void main(java.lang.String[] args)
AdminClient and
invokes process(args).
Diagnostic output goes to log.info.
args - Commands to processCopyright ? 2005 Apache Web Services Project. All Rights Reserved.