Chapter 6 Using the wstool Command Line Tool


wstool SOAP template generation command

The wstool command for SOAP message templates generate templates that help you develop client-side applications. wstool accepts one or more EAServer entity names and creates a request message template and a response message template for each method within the entity names specified. Only methods whose signature includes Web Services Toolkit-supported datatypes are valid for inclusion.

For example, if you specify an EAServer package entity name, an EAServer component entity name, and an EAServer method entity as wstool parameters, the template generator generates request and response message templates for the method in each of the specified entities. However, templates are generated only if all the method's parameters met the SOAP datatype requirements. See Chapter 7, "Selecting an EAServer Component for Your Web Service", for more information on supported datatypes.

This section contains information on the wstool generating a SOAP template command. The command syntax, options list, and three examples of its usage are shown in this section.

Syntax

gen_templates [options] -outFile output filename [entity type:entity name...]

Options

The following table lists command options, descriptions, defaults, and whether or not the option is required.

Table 6-2: Options for wstool for SOAP template generation command
Option Description Default Required
-outFile filename The name of the output template file. -- Yes
entity type:entity name One or more pairs of a valid EAServer entity type and name. --

Package, Component and Method are the valid entity types.
Yes, unless -entityFile
is used. This must be
the last entry on the
command line.
-entityFile filename Contains the EAServer entity names. -- No, unless entity type:entity name is not used.
-append Appends new templates to the outfile specified. -- No
-help
-?
Either option prints help text and then exits. -- No
-version Prints the version of the gen_templates command tool and then exits. -- No
-d Writes debug statements to the Jaguar.log file in the EAServer bin directory No logging. No
-t Writes trace statements to the Jaguar.log file in the EAServer bin directory. No tracing. No

Examples

To create a SOAP template document from command-line entities:

wstool gen_templates -outFile  output.xml Package:JaguarPackageNameA Component:JaguarPackageNameB/JaguarComponentNameB Method:JaguarPackageNameC/JaguarComponentNameC/JaguarMethodNameC

To create a SOAP template from an entities file:

wstool gen_templates -entityFile  entity.txt -outFile output.xml 

To append a SOAP template to an existing file:

wstool gen_templates -append  -outFile output.xml Package:JaguarPackageNameD

 


Copyright © 2002 Sybase, Inc. All rights reserved.