Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Web Service Development Guide

20.2 Invoking the Generator

HydraExpress's code generator requires:

In addition, various generation options are available.

To use rwsfgen, obtain or create a WSDL or XML Schema document. To use one of the examples provided with the HydraExpress installation, go to the directory <installdir>\examples\ xmlbinding\... containing XML binding examples using XML Schemas, or <installdir>\examples\ webservices\... containing Web services examples using WSDLs.

  1. Set your environment, as described in Chapter 2, "Setup," in the HydraExpress User Guide.

  2. Open a command prompt and navigate to the directory containing the WSDL or schema file.

  3. Invoke the HydraExpress code generator, as described in Section 20.4 and Section 20.3. The general command line format for the generator is:

The mandatory file argument specifies either a HydraExpress project file or any number of WSDL or XML Schema files. The mandatory -projectname argument identifies a name for this project and also mandates the name of the generated HydraExpress project file, as well as the code generation directory. The options may either precede or appear after the file argument.

A HydraExpress project file is an XML-based file containing all project elements for this particular project, such as WSDLs, schemas, options, compilers, and other project elements. You may create this file yourself and use it as a sole argument to the generator. Alternatively, HydraExpress generates this file for you, names it according to your project name, and includes in it all WSDL(s), schema(s), and any optional arguments used when you invoked the generator. See Section 20.2.1.

The rwsfgen program accepts the optional arguments and properties shown in Section 20.6.

20.2.1 Introduction to the HydraExpress Project File

The XML-based HydraExpress project file defines all elements for this project.

If the command line does not specify a project file, HydraExpress generates one using the options specified on the command line. For example, a command line of

would result in the creation of a project file called MyProject.xml in a directory MyProject. The project file would define a single WSDL file, MyWSDL.wsdl, and would also include a number of other elements defining default values for the various project options.

To reinvoke the code generator, you may either

For detailed information on the HydraExpress project file, see Section 21.3, "The Generated Project Directory."

20.2.1.1 Using the HydraExpress Project File to Set Options

While you may enter options on the command line, you may also either add them directly to an already-generated HydraExpress project file, or create a separate HydraExpress project file containing options that you wish to use regularly across like projects. This file may be called anything as long as it includes available HydraExpress project elements and options. See Section 21.3 for an example project file.

For example, the shipped examples use a HydraExpress project file titled example-project.xml. This file contains options such as -sourcepro or -whitespace and is provided to HydraExpress at code generation time. For an example of this file, see the DayOfWeek example in your <installdir>\examples\webservices\DayOfWeek directory.

For more information on options in general, see Section 20.6, "Generator Options." For more information on using a HydraExpress project file to set options, see Section 21.2.3, "Creating a Customized Project File for Special Generation Options."



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.