Chapter 8: Using wstool, wstkeytool, wstant, and wstkeytoolant  Working with wstant and wstkeytoolant

Chapter 8: Using wstool, wstkeytool, wstant, and wstkeytoolant

Introduction

wstool is a command line interface that allows you to administer, monitor, and deploy Web services contained in the EAServer Web service container.

You can use wstool from the command line, from scripts or makefiles, or with Jakarta Ant (wstant).

wstkeytool is a command line interface that allows you to manage a keystore (database or file) of private keys and their associated X.509 certificate chains. In this case, the keystore is the EAServer security module. wstkeytool commands allow you to manipulate the EAServer security module without having to use Security Manager.

See the EAServer Security Administration and Programming Guide for definitions and information about Security Manager.

You can use wstkeytool from the command line, from scripts or makefiles, or with Jakarta Ant (wstkeytoolant).


Working with wstool and wstkeytool

Before using wstool or wstkeytool, make sure that the JAGUAR environment variable is set to the EAServer installation directory. Use the following scripts to run wstool and wstkeytool:


wstool and wstkeytool syntax

The syntax for wstool and wstkeytool is:

wstool or wstkeytool [connection-arguments] [command]

Where:

For example, to connect to the server running on “paloma” at HTTP port “9005”, using account “jagadmin” with password “secret” enter:

wstool -h paloma -n 9005 -p secret or wstkeytool -h paloma -n 9005 -p secret

You can omit the -u flag because jagadmin is the default user name.

Notewstool and wstkeytool command options are not case sensitive.


Return codes

wstool and wstkeytool commands return the following codes:

0 – if the command runs successfully, and the result is true/success

1 – if the command runs successfully, and the result is false/failure

2 – if an exception is thrown during the running of the command


Help

You can display usage for any wstool or wstkeytool command by using the help option. For example to display all of the wstool or wstkeytool commands, enter:

wstool help or wstkeytool help

You can also display individual command help. For example, to display options and valid usage for the wstool delete command, enter:

wstool help delete

To display options and valid usage for the wstkeytool deleteCert command, enter:

wstkeytool help deleteCert 

Verbose

All wstool and wstkeytool commands include the verbose option, which displays stack trace information, if any is generated, when you run the command. The default value is false. For example, to display stack trace information for the wstool delete command, enter:

wstool delete -verbose true Service:CollectionName/WebServiceName

Entity identifiers

Many wstool and wstkeytool commands take one or more entity identifiers as arguments. An entity identifier is a string of the form EntityType:EntityName that uniquely identifies an entry in the repository; for example, a server, component, collection, or keystore name.

Table 8-1 provides examples of entity identifiers for each entity type.

Table 8-1: Example entity identifiers

Entity identifier

Specifies

component:SVU/SVULogin

(wstool)

Component named SVULogin that is installed in the SVU package. The package name is included because EAServer components always reside in packages.

collection:MyCollection

(wstool)

The Web services collection named MyCollection.

method:SVU/SVULogin/isLogin

(wstool)

The isLogin method of component SVULogin in package SVU.

role:MyRole

(wstool)

The role named MyRole.

server:Jaguar

(wstool)

The server named Jaguar.

service:MyWcoll/MyWebService

(wstool)

The Web service named MyWebService contained in the MyWcoll Web collection.

methodParams:SVU/SVULogin/isLogin

(wstool)

The method parameters for the isLogin method of component SVULogin in package SVU.

Key:name

(wstkeytool)

The name of a private key contained in the keystore.

Not all wstool or wstkeytool commands support every type of entity in the repository. Use the help option to see the supported entities for each command.

When a command specifies an invalid entity type, an error message displays.





Copyright © 2005. Sybase Inc. All rights reserved. Working with wstant and wstkeytoolant