HydraExpress User Guide : PART I Introduction : Chapter 1 Introduction : Shipped Examples
Shipped Examples
HydraExpress ships with Web service, XML binding, and servlet examples located in the <installdir>\examples directory. These examples are used for illustration in various chapters throughout the documentation. Most examples include already-implemented applications that you can use immediately to see how HydraExpress works.
Each Web service or XML binding example directory contains
one or more schemas or WSDL files to be used for code generation
sample implementations to easily run and test the example
a HydraExpress project file example-project.xml to be used as an argument to the code generator
a readme.txt file that fully explains the purpose of the example, and how to generate, build, and run it.
The next section describes the use of the project file in Web service and XML binding examples. “Servlet Examples” discusses the servlet examples.
The Use of the HydraExpress Project File in Shipped Examples
A HydraExpress project file is provided with each shipped Web service and XML binding example to ensure that the example runs correctly.
Each example includes the XML Schema file(s) or WSDL file(s) to be provided to the code generator, in addition to any options recommended or required by the particular example. For instance, most example-project.xml files set whitespace=true, which results in more easily-read output.
Using the example-project.xml file as an argument to the code generator invokes the generator in exactly the same way as including each option separately on the command line.
For example, invoking the code generator with:
 
prompt>rwsfgen example-project.xml
where the example-project.xml file is this:
 
<rwsf-codegen-project>
<options>
<option name='project-name' value='MyProject'/>
<option name='whitespace' value='true'/>
</options>
<files>
<inputSchema file='po.xsd'/>
</files>
</rwsf-codegen-project>
is exactly the same as invoking the following:
 
prompt>rwsfgen -projectname MyProject -whitespace po.xsd
For the shipped examples, we recommend the use of the provided project files. For your own projects, you have the choice to create customized project files to include various options or to manually enter files and options at the command prompt.
For more information on the HydraExpress project file, see “The Project File” in the HydraExpress Web Service Development Guide.
Servlet Examples
The servlet examples are located in <installdir>\examples\servlet, but it is unnecessary to go to this location to examine them. If you start the Agent (as explained in the next chapter) and enter http://localhost:8090 into a browser, a page displays confirming that the Agent is running, and giving access to all of the servlet examples. For each example there is a description, a link to execute the servlet, and links to the header and source files.