This section discusses how the Weather Summary example is designed to work and the files generated for the Weather Summary WSDL. In addition to the normal client and server classes to support request-response and one-way, a special set of notification classes are generated to support notification and solicit-response, the two patterns in which the server initiates the message.
Note that the WeatherSummary directory contains provided implementation files and a project file, example-project.xml. This is a HydraExpress project file providing custom configuration information to the generator. In this case, the file assigns a project-name value of WeatherSummaryExample, and directs the generator to generate code using the -whitespace option. (For more information on the HydraExpress project file, see Section 21.2, "The Project File.")
Generate code by invoking the code generator as described in the preceding chapters. The most basic call would be
prompt> rwsfgen example-project.xml
to generate code into a directory WeatherSummaryExample based on the project name provided in the example-project.xml file. You could also enter the options and WSDL file manually, as follows:
prompt> rwsfgen -projectname WeatherSummaryExample -whitespace WeatherSummary.wsdl
The HydraExpress project file example-project.xml includes all options and files to be used as an argument to the code generator, so using this file results in exactly the same generated code as providing the options and files directly as arguments. For more information on the use of HydraExpress project files in shipped examples, see Chapter 2, "Setup," in the Introduction to HydraExpress.
Table 5 shows the code and support files that are generated for the WeatherSummary service.
Files that are overwrite-protected are generated with a ".sample" extension if a file exists in the output directory of the same name. See Section 20.7, "Overwrite Protection."
Directory | Files | Description |
WeatherSummary |
WeatherSummaryExample.xml | The project file defining all project elements (options, configurations, schemas, WSDLs, etc.). See Section 21.2. |
|
makefile | Project-level makefiles. Calls all makefiles in subdirectories. Overwrite-protected. |
|
makefile.include | Include makefile. Contains all makefile compiler and linker options. Edits to this file cascade down to all makefiles. Overwrite-protected. |
|
[WeatherSummaryExample.dsw or | MSVC 6 workspace or MSVC 7 solution files. Generated for Windows platforms, depending on value of -projectversion flag. |
|
deployDebug.bat deployRelease.bat | Convenience debug and release deployment batch files generated for use with MSVC projects. |
app/ |
makefile | Makefiles. Builds contents of app/ directory. Overwrite-protected. |
/client |
WeatherSummaryClient.cpp | Sample client implementation using the client proxy. Overwrite-protected. |
|
makefile | Makefiles. Builds contents of app/client directory. Overwrite-protected. |
|
[WeatherSummaryClient.dsp or | MSVC6 or MSVC7 project files generated for Windows platforms. |
/server |
WeatherSummaryImp.cpp WeatherSummaryImp.h | Sample service implementation and header files. |
|
makefile | Makefiles. Builds contents of app/server directory. Overwrite-protected. |
|
[WeatherSummaryPortService.dsp or | MSVC6 or MSVC7 project files generated for Windows platforms. |
/data |
WeatherSummary_types_main.cpp | Sample data application to marshal and unmarshal the datatype WeatherSummary. |
makefile | Makefiles. Builds contents of app/data directory. Overwrite-protected. | |
[WeatherSummary_types_main.dsp or WeatherSummary_types_main.vcproj] | MSVC6 or MSVC7 project files generated for Windows platforms. | |
codegen/ |
makefile | Makefiles. Calls makefiles in all subdirectories. Overwrite-protected. |
/client |
WeatherSummaryNotificationBase.cpp | Source files for client-side classes |
|
makefile | Makefiles. Builds contents of codegen/client directory. Overwrite-protected. |
|
[WeatherSummaryClientLibrary.dsp or | MSVC6 or MSVC7 project files generated for Windows platforms. |
/etc |
WeatherSummaryExample-manifest.xml | Manifest file containing marshalling configuration file for any generated datatypes. |
/server |
MyServiceBindingSkeleton.cpp MyServicePortTypeBase.cpp | Implementation files for the class that handles messaging and the base class for the server-side implementation. |
|
makefile | Makefiles. Builds contents of codegen/server directory. Overwrite-protected. |
|
[WeatherSummaryService.dsp or | MSVC6 or MSVC7 project files generated for Windows platforms. |
/data |
makefile | Makefiles. Builds contents of codegen/data directory. Overwrite-protected. |
|
[WeatherSummary_typesLibrary.dsp or WeatherSummary_typesLibrary.vcproj] | MSVC6 or MSVC7 project files generated for Windows platforms. |
/wsx |
WeatherSummary.cpp WeatherSummaryMarshal.cpp | The implementation files for the datatype WeatherSummary and its marshaler. See Chapter 6 for more information on complex datatypes. |
conf/ |
server-transports.xml client-transports.xml | Configuration files for: |
|
Weather_handlers.xml | 2. Server-side handlers to support handler chaining and configuration |
|
client-handlers.xml | 3. Client-side handlers containing default client logger |
|
Weather_objects.xml | 4. All named objects required by this service. These are registered and created when the container is started. |
|
Weather_web.xml | 5. Deployment XML file for the service. |
|
makefile | Deployment makefiles. Overwrite-protected. |
docs/ |
index.html | The generated documentation. Use index.html as the entry point to all docs contained in the docs subdirectories. |
include/ |
| Header files, as follows: |
/WeatherSummaryExample | Subdirectory based on project name. | |
|
WeatherSummaryProxy.h | Client proxy class |
|
WeatherSummarySkeleton.h | Class that handles messaging |
|
WeatherSummaryBase.h | Base class for the server-side implementation. |
|
WeatherSummaryNotificationBase.h | Base class for the notification client-side implementation |
|
WeatherSummaryNotificationProxy.h | Notification proxy on the server side. |
|
WeatherSummaryNotificationSkeleton.h | Class that handles messaging for the notification. |
|
WeatherSummary_typesConverter.h | Conversion utility class (converts the simple types defined in the datamap to and from the underlying string class, string). |
/wsx |
WeatherSummary.h | Datatype class. |
|
WeatherSummaryMarshal.h | Datatype marshaling class. |
As for all projects, by default the code generation includes HTML documentation for all generated code, located in the docs subdirectory of the output directory.
For a discussion of the complex type WeatherSummary.cpp generated above, see Chapter 6.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.