The rwsfgen program accepts the options listed in Table 12:
Option | Effect |
-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 |
-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 |
-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 Section 8.3, "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 Section 8.3, "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 |
-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. |
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 21.6.3 for more information on property precedence.
For more information on working with project files, see Section 22.2, "The Project File."
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 Chapter 8, "Mapping XML Schema to C++," in the HydraExpress XML Binding Development Guide. See also Chapter 20, "Internationalizing Your Services."
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 23, "Options for Compiling," for more information.
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:
Platform properties files
A HydraExpress project file
Command line options assignments
This section details how property precedence works during code generation.
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 21.6.2.)
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.
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 21.6, "Generator Options."
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.