Invoking the Generator
HydraExpress’s code generator requires:
*at least one file argument that specifies either a HydraExpress project file, a WSDL file or an XML Schema. Multiple WSDLs and XML Schemas, and HydraExpress project files may be specified.
*a project name provided either through the -projectname command line option or in a HydraExpress project file using the project-name attribute. If a project name is not specified, an error is generated: “ERROR: A project name was not found. Please specify a project name on the command line or in a project file.”
By default, HydraExpress places the generated code into a directory based on the provided project name, although that value can be overridden using the -outdir option. To create a code generation directory with a different name, simply use the -outdiroption as discussed in Generator Options.
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 Invoking the Generator with a WSDL File and Invoking the Generator with an XML Schema. The general command line format for the generator is:
 
<prompt> rwsfgen [options] -projectname MyProject file [file file...]
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 Introduction to the HydraExpress Project File.
The rwsfgen program accepts the optional arguments and properties shown in Generator Options.