Invoking the Generator
Make sure that you have set up your environment as described in Chapter 2, Setup in the HydraExpress User Guide.
Open a command prompt and change to the examples\webservices\DayOfWeek directory under the RWSF_HOME directory, as shown below:
cd %RWSF_HOME%\examples\webservices\DayOfWeek
cd $RWSF_HOME/examples/webservices/DayOfWeek
In addition to the DayofWeek WSDL and the provided implementation files, this directory contains a HydraExpress project file, example-project.xml. This file provides custom configuration information to the generator. (For more information on the HydraExpress project file, see Chapter 21, The Project File and Directory Structure.
If you open this file, you’ll note that it identifies a value for the project-name attribute and a files element that references the DayofWeek.wsdl, so there is no need to include these items on the command line if this file is provided to the generator.
Run rwsfgen with example-project.xml as the sole argument, as follows:
prompt> rwsfgen example-project.xml
The above invocation is exactly the same as the following:
prompt> rwsfgen -projectname DayOfWeekExample -whitespace DayofWeek.wsdl
NOTE: The two required options above are -projectname and the name of the file to parse. The project name is required, and may be entered directly into a HydraExpress project file or on the command line. Note that the name may not include spaces, as HydraExpress supports only file paths without spaces.
Since this chapter is primarily interested in creating a client to access the service, we could also choose to generate only a client, using an additional argument -noserver as follows:
prompt> rwsfgen -noserver example-project.xml
Since we will be using this example to also discuss server-side options in Chapter 8, we’ll build both a client and server.
For full information on the various code generation options, see Generator Options.