Package org.apache.axis.client
Class AdminClient
java.lang.Object
org.apache.axis.client.AdminClient
An admin client object that can be used both from the command line
and programmatically.
- Author:
- Rob Jellinghaus (robj@unrealities.com), Doug Davis (dug@us.ibm.com), Simeon Simeonov (simeons@macromedia.com)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct 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. -
Method Summary
Modifier and TypeMethodDescriptiongetCall()
External access to ourCallinvalid input: '<'/codeinvalid input: '<' object.
list()
send a list commandprocess the options then run a list callstatic void
Creates in instance ofAdminClient
and invokesprocess(args)
.process
(InputStream input) process an XML file containing a pre-prepared admin messageProcesses a set of administration commands.process
(Options opts, InputStream input) submit the input stream's contents to the endpoint, return the results as a string.void
processOpts
(Options opts) go from the (parsed) command line to setting properties on our call object.quit()
make a quit commandprocess the command line ops, then send a quit commandstatic void
If the user calls this with an EngineConfiguration object, all AdminClients on this thread will use that EngineConfiguration rather than the default one.void
set the username and password requires that call!=nullvoid
setTargetEndpointAddress
(URL address) set the URL to deploy to requires that call!=nullvoid
setTransport
(String transportName) set the transport to deploy with.undeployHandler
(String handlerName) undeploy a handlerundeployService
(String serviceName) undeploy a service
-
Field Details
-
log
protected static org.apache.commons.logging.Log log -
call
the object that represents our call -
ROOT_UNDEPLOY
root element of the undeploy request
-
-
Constructor Details
-
AdminClient
public AdminClient()Construct an admin client w/o a logger. If the client cannot create a call object, then it does not throw an exception. Instead it prints a message toinvalid reference
System.err
-
AdminClient
this is a somwhat contrived variant constructor, one that throws an exception if things go wrong.- Parameters:
ignored
-- Throws:
ServiceException
-
-
Method Details
-
setDefaultConfiguration
If the user calls this with an EngineConfiguration object, all AdminClients on this thread will use that EngineConfiguration rather than the default one. This is primarily to enable the deployment of custom transports and handlers.- Parameters:
config
- the EngineConfiguration which should be used
-
getCall
External access to ourCallinvalid input: '<'/codeinvalid input: '<' object. This will be null if the non-excepting constructor was used and the construction failed.
- Returns:
- the
Call
object this instance uses
-
list
process the options then run a list call- Parameters:
opts
-- Returns:
- Throws:
Exception
-
list
send a list command- Returns:
- the response from the call
- Throws:
Exception
-
quit
process the command line ops, then send a quit command- Parameters:
opts
-- Returns:
- Throws:
Exception
-
quit
make a quit command- Returns:
- Throws:
Exception
-
undeployHandler
undeploy a handler- Parameters:
handlerName
- name of the handler to undeploy- Returns:
- Throws:
Exception
-
undeployService
undeploy a service- Parameters:
serviceName
- name of service- Returns:
- Throws:
Exception
-
process
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 services
If
-l
or-h -p -s
are not set, the AdminClient will invokehttp://localhost:8080/axis/servlet/AxisServlet
.- Parameters:
args
- Commands to process- Returns:
- XML result or null in case of failure. In the case of multiple commands, the XML results will be concatenated, separated by \n
- Throws:
Exception
- Could be an IO exception, an AxisFault or something else
-
processOpts
go from the (parsed) command line to setting properties on our call object.- Parameters:
opts
-- Throws:
Exception
- if call==null
-
setLogin
set the username and password requires that call!=null- Parameters:
user
- usernamepassword
- password
-
setTargetEndpointAddress
set the URL to deploy to requires that call!=null- Parameters:
address
-
-
setTransport
set the transport to deploy with. requires that call!=null- Parameters:
transportName
- a null or empty value does not trigger a setting
-
process
- Throws:
Exception
-
process
- Throws:
Exception
-
process
process an XML file containing a pre-prepared admin message- Parameters:
xmlFile
- file to load- Returns:
- Throws:
Exception
-
process
- Throws:
Exception
-
process
submit the input stream's contents to the endpoint, return the results as a string. The input stream is always closed after the call, whether the request worked or not -
main
Creates in instance ofAdminClient
and invokesprocess(args)
.Diagnostic output goes to
log.info
.- Parameters:
args
- Commands to process
-