Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Web Service Development Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

20.6 Generator Options

The rwsfgen program accepts the options listed in Table 11:

Table 11: Optional arguments for rwsfgen 

OptionEffect

-projectname name

Specify a name for the project. This option results in a HydraExpress project file named name. Required.

no arguments or -help

Entering rwsfgen with no arguments, or with -h or with -help launches usage information or "help" for the rwsfgen program. The output lists all optional arguments included in this table. This is a command line option only.

-noclean

Disable file and directory cleanup at the end of the code generation. This can be useful for troubleshooting. Default is -clean.

-noclient

Do not generate client-side code or a sample application for the client. Default is -client.

-nohtml

Do not generate HTML pages that document the generated classes. For large schemas, specifying this option may greatly reduce code generation time. Default is -html.

-nomake

Do not generate a makefile. Default is -make.

-nosample

Do not generate a sample client or a sample service implementation. Default is -sample.

-noserver

Do not generate server-side code or a server implementation. Default is -server.

-childTypeAttr

Control whether the xsi:Type attribute is present in the controlling child elements of complex types. Default is
-nochildtypeattr. (Applicable only to schema types that appear in Web service messages.)

-haltonerror
-nohaltonerror

Control whether code generation halts when it encounters an error, or goes ahead and generates code. May be useful to ensure code generation for known schema errors (for instance, in the event that they occur in an unused part of the schema). Default is -haltonerror.

-datamap

Specify file containing the datamap used for XML Schema to C++ datatypes. Note: This option overrides
-sourcepro and -stl.

-logfilename <name>

Specify a name for the log file. Default is rwsfgen.log.

-marshaller <class>

Specify an alternate marshaler code generator class

-makefilename <name>

Specify a specific name for the generated makefiles. Useful to distinguish between makefile names if generating a project with multiple compilers.

-ordinalanonymous

Specify that anonymous types in the schema are named "AnonymousType_" with sequential numbering suffixes. This provides a workaround for deeply-nested anonymous definitions that may result in C++ and file name identifiers longer than a compiler or operating system allows. Default is -noordinalanonymous.

-outdir <directory>

Put generated files in <directory>. Can be an absolute or a relative path. Default is to generate files in existing directory.

-platform <name>

Specify which platform properties file to load; defaults to auto-detection. Platform values are:

aix-va60, aix-va60-64, hpux-hpacc, hpux-hpacc-64, redhat-gcc,redhat-icc, solaris-gcc, solaris-sunpro, solaris-sunpro-64, suse-gcc, windows-msvc, windows-icl

-projectversion version

Windows only. Specifies the version of MSVC for which project files should be generated. Accepted values are 7.1 and 8.0. The default is 7.1.

-rwsfhome <path>

Specify the RWSF_HOME directory.

-soapenc

Generate code for complex types in the SOAP encoding namespace. Default is -nosoapenc.

-sourcepro1

Map XML Schema types to SourcePro C++ classes. For a complete list of the SourcePro C++ type mappings, see , "Simple Types," in the HydraExpress XML Binding Development Guide. Default is -nosourcepro.

-stl

Use a type mapping based on Standard C++ Library classes rather than SourcePro C++ classes. This is the default. For a complete list of the STL type mappings, see , "Simple Types," in the HydraExpress XML Binding Development Guide. This is the default binding. Default is -stl

-usesourceprodb

Use SourcePro DB when generated marshalers. (Use this only if you are building database services.)

-standalone

Generate a sample standalone server for running the Web service independent of the HydraExpress Agent. Default is -nostandalone.

-toplevelclasses

-notoplevelclasses

By default, HydraExpress generates classes for the top-level elements in a schema. If the -notoplevelclasses is used, HydraExpress instead generates a convenience class, MySchemaStatics, that contains static variables of the element names so the corresponding type classes can easily marshal the elements. Default is
-toplevelclasses.

-whitespace

By default, the rwsf::XmlWriter created for marshaling datatypes eliminates all unnecessary whitespace. This improves performance but makes the document difficult to read. If your output documents need to be human readable, specify -whitespace to preserve whitespace such as line breaks and indentations. Default is -nowhitespace.

-wrapped

Enable the wrapped style as described in Section 8.3.8, "Wrapped Style Operations.". Default is -nowrapped.

-verbose

Output informational messages to the console. Default is -noverbose.

-version

Print the HydraExpress version number and exit. This is a command line option only.

  1. The -stl and -sourcepro options affect only the mappings of built-in schema types. Code generated with the
    -sourcepro option will still contain Standard Library classes for some of its implementations.

20.6.1 Adding Options and Customized Mappings to the HydraExpress Project File

Generally, you will add options directly to the command line when you invoke the generator, and HydraExpress will then merge these options into the generated HydraExpress project file. This way, if you wish to rerun the generator, you do not need to again enter options on the command line, unless they have changed.

You may also choose to change the options directly in the HydraExpress project file before code generation, and provide it as the only argument to the generator.

Alternatively, you may add special options directly to a separate HydraExpress project file, and supply it as an argument to the code generator. This approach allows you to maintain a customized project file containing a specific set of options that you might use on a particular type of project, avoiding the need to enter each one manually at the command line.


If you provide more than one HydraExpress project file to the code generator, the values in the last project file on the command line override any previous values in the event of conflicts. See Section 20.6.3 for more information on property precedence.

For more information on working with project files, see Section 21.2, "The Project File."

20.6.1.1 Providing Customized Type Mappings to the Code Generator

You may also specify customized type mappings using the <mappings> element of the generated HydraExpress project file, or creating a separate HydraExpress project file containing just a <mappings> element and providing it as an argument to the code generator.

This can allow you to set up customized mappings for schema namespaces, or special character encoding conversions. For more information, see , "Mapping XML Schema to C++," in the HydraExpress XML Binding Development Guide. See also Chapter 19, "Internationalizing Your Services."

20.6.2 Adding Outside Libraries, Includes or Compiler Properties to a Project

To include third-party libraries or other includes in your project, add them to the generated include makefile, makefile.include, located in the top level of your code generation directory. This file is included in the top-level makefiles and supports easy customization and editing of your makefiles. See Chapter 22, "Options for Compiling," for more information.

20.6.3 Conflicting Options and Property Precedence

HydraExpress code generator options may be assigned in several different ways, including in the HydraExpress project file, or on the command line. Because of the many options for configuring the code generator, conflicting assignments can occur for a single property. To ensure that the generator uses the right value for a given property, be aware of the following precedence, from lowest to highest:

  1. Platform properties files

  2. A HydraExpress project file

  3. Command line options assignments

This section details how property precedence works during code generation.

20.6.3.1 Platform Properties and Startup Properties Files

For each supported platform, a properties file is used to configure information needed by the makefile or project file. This file includes options such as compiler flags, linker flags, commands for invoking the compiler and linker, etc. This file is located at <installdir>\conf\common\platforms\<platform-name>.

To change how HydraExpress behaves on a regular basis, such as changing the way the compiler is invoked, edit these files. (To change compiler properties for a specific project, edit the generated makefile.include file. See Section 20.6.2.)

20.6.3.2 The HydraExpress Project File

When a HydraExpress project file is provided to the code generator, its properties override any properties with the same names defined in the platform properties file.

If more than one HydraExpress project file is provided to the code generator, and those files contain conflicting values for any options, the values in the last project file on the command line override values set in an earlier file.

20.6.3.3 Command Line Options

Options can be set on the command line. These assignments override any that have been made in the properties files and any HydraExpress project file.

Note that the order in which options are entered on the command line affects precedence, as well. Options entered last override any options entered earlier on the command line, in the event of a conflict. For a complete list of options, see Section 20.6, "Generator Options."



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.