An admin client object that can be used both from the command line
and programmatically.
getCall
public Call getCall()
External access to our Call
This will be null if the non-excepting constructor was used
and the construction failed.
- the
Call
object this instance uses
list
public String list()
throws Exception
send a list command
- the response from the call
list
public String list(Options opts)
throws Exception
process the options then run a list call
opts
-
main
public static void main(String[] args)
Creates in instance of
AdminClient
and
invokes
process(args)
.
Diagnostic output goes to
log.info
.
args
- Commands to process
process
public String process(InputStream input)
throws Exception
process
public String process(String xmlFile)
throws Exception
process an XML file containing a pre-prepared admin message
xmlFile
- file to load
process
public String process(String[] args)
throws 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 touse
list
will list the currently deployed services
quit
will quit (???)
passwd value
changes the admin password
xmlConfigFile
deploys or undeploys
Axis components and web services
If
-l
or
-h -p -s
are not set, the
AdminClient will invoke
http://localhost:8080/axis/servlet/AxisServlet
.
args
- Commands to process
- XML result or null in case of failure. In the case of multiple
commands, the XML results will be concatenated, separated by \n
process
public String process(URL xmlURL)
throws Exception
process
public String process(Options opts,
InputStream input)
throws Exception
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
opts
- options -can be nullinput
- -input stream for request
process
public String process(Options opts,
String xmlFile)
throws Exception
processOpts
public void processOpts(Options opts)
throws Exception
go from the (parsed) command line to setting properties on our call object.
opts
-
quit
public String quit()
throws Exception
make a quit command
quit
public String quit(Options opts)
throws Exception
process the command line ops, then send a quit command
opts
-
setDefaultConfiguration
public 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. This is primarily to enable the
deployment of custom transports and handlers.
config
- the EngineConfiguration which should be used
setLogin
public void setLogin(String user,
String password)
set the username and password
requires that call!=null
user
- usernamepassword
- password
setTargetEndpointAddress
public void setTargetEndpointAddress(URL address)
set the URL to deploy to
requires that call!=null
address
-
setTransport
public void setTransport(String transportName)
set the transport to deploy with.
requires that call!=null
transportName
- a null or empty value does not trigger a setting
undeployHandler
public String undeployHandler(String handlerName)
throws Exception
undeploy a handler
handlerName
- name of the handler to undeploy
undeployService
public String undeployService(String serviceName)
throws Exception
undeploy a service
serviceName
- name of service