Generate Code
1. Follow the instructions in Chapter 2, “Setup,” in the HydraExpress User Guide to set up your environment.
2. Open a command prompt and navigate to the directory installdir\examples\xmlbinding\soap\.
3. Invoke the code generator, using the command below:
rwsfgen example-project.xml
HydraExpress generates code into a separate code generation directory
soapExample based on the provided project name in the HydraExpress project file
example-project.xml. This file identifies both the
soap.xsd and
trade.xsd as arguments to the code generator and also contains the customized mapping discussed in
“Customizing Mappings Using the Project File” . This file is provided for you in the directory
installdir\examples\xmlbinding\soap. For more information on the use of HydraExpress project files in shipped examples, see
“The Use of the HydraExpress Project File in Shipped Examples,” in the HydraExpress User Guide.
At code generation, HydraExpress creates the HydraExpress project file soap.xml in the top-level code generation directory, appending the contents of example-project.xml, as well as other generation properties. For more information on the project file, see “The Project File,” in the HydraExpress Web Service Development Guide.
For complete information about the command-line options, see “Generator Options,” in the HydraExpress Web Service Development Guide
Generator Output
The code generator places the generated files into a directory tree under the main code generation directory. For a description of the code generation directory structure and the types of files generated, see the output description for the Basic example in
“Generated Files.”Note the generated files
soap_main.cpp and
trade_main.cpp in the
soapExample\app\data directory. You can create an application
main by editing either of these file. Replace the
TODO items with your application logic. Compile the application as described in
“Building and Compiling” .
The example descriptions assume use of the implemented versions of soap_main.cpp and trade_main.cpp located in the directory installdir\examples\xmlbinding\soap.