Web Service Development Guide : PART V HydraExpress Reference : Chapter 21 The Project File and Directory Structure : The Generated Project Directory
The Generated Project Directory
At code generation, HydraExpress creates a series of subdirectories to hold the generated code. This structure allows you to easily navigate through your project to locate the files you need. For example, the sample implementations are separated from the rest of the generated code, and the configuration files are in their own directory.
This section describes the code generation directory structure, including the top-level directory and all subdirectories.
The Top-Level Code Generation Directory
At code generation, HydraExpress creates a code generation directory containing the following subdirectories (in bold) and files at the top level:
 
projectname\
app\
bin\
codegen\
conf\
docs\
include\
lib\
projectname.sln <!-for Windows MSVC only-->
projectname.xml <!-- HydraExpress project file -->
deployDebug.bat
deployRelease.bat
makefile
makefile_debug
makefile.include
The subdirectories for the project include:
app. Contains all sample implementation files. You are expected to modify the files in this directory.
bin. Contains all executables and .dll files.
codegen. Contains code-generated files that should not be modified. These are not overwrite-protected, so will be overwritten each time the code generator is run.
conf. Contains configuration files including transports, handlers, named objects, and the service descriptor file.
docs. Contains all HTML documentation for the generated classes. For single-point access to all generated documentation for this project, use index.html.
include. Contains all include files.
lib. Contains all libraries (.lib and .so files).
The top-level project files are:
<projectname>.xml. The project file. See “The Project File”.
makefile and makefile_debug. The top-level makefiles. To customize the name of a makefile, use the -makefilename option at code generation. Overwrite protected.
makefile.include. The include makefile included in both above makefiles and containing all compiler and linker options. Edits to this file cascade down to all makefiles. Overwrite protected.
deployRelease.bat and deployDebug.bat. Deployment batch files generated for MSVC projects.
<projectname> .sln. The top-level MSVC solution project file. Overwrite protected.
The SubDirectories
The generated subdirectories contain additional subdirectories, discussed in this section.
The App Directory
The app directory contains code you are expected to modify. All contents are overwrite-protected. For a discussion on overwrite-protection, see “Overwrite Protection”.
The app directory contains several subdirectories and makefiles. Each subdirectory is created only if the generator created relevant code. For example, if you generated code using a -noserver option, the generator would not create a subdirectory server. These subdirectories are listed in bold below.
 
app\
makefile, makefile_debug
client\
MyServiceClient.cpp
makefile, makefile_debug
obj\
MyServicePortClient.obj
data\
<schema name>_main.cpp
makefile, makefile_debug
obj\
<schema name>_main.obj
server\
MyServiceImp.cpp
MyServiceImp.h
makefile, makefile_debug
obj\
MyServiceImp.obj
For information on how the code generator names the generated files, please see Appendix A.
The client subdirectory includes any client sample implementations, including the sample Client.cpp. Its only subdirectory is an obj directory containing object files. The obj directory is created when you build the contents of the client directory.
The data subdirectory contains sample code for all specified schemas in the project. If there are no schemas, this directory is not created.
The server subdirectory contains sample server implementations.
The Bin Directory
The bin directory contains all executables and DLL’s. Be aware that the contents of this directory are not overwrite protected.
For example:
bin\
*.dll
*.exe
 
The Codegen Directory
The codegen directory contains generated code used internally by HydraExpress. The code in this directory should not be modified.
The codegen directory contains the following subdirectories (in bold) and makefiles:
 
codegen\
makefile, makefile_debug
client\
MyServiceProxy.cpp
makefile, makefile_debug
obj\
MyServiceProxy.obj
common\
fault_message.cpp
makefile, makefile_debug
data\
<namespace>\
DataTypeMarshal.cpp
DataType.cpp
makefile, makefile_debug
obj\
<namespace>\
DataTypeMarshal.obj
DataType.obj
etc\
<project name>-manifest.xml
server\
MyServiceBase.cpp
MyServiceSkeleton.cpp
makefile, makefile_debug
obj\
MyServiceBase.obj
MyServiceSkeleton.obj
Like the app directory, codegen includes subdirectories that sort the code into client, server, and data-related groups, and include proxies, the server skeleton, and data objects. Again, these subdirectories are created only if the generator is creating relevant code.
Note the existence of the common directory. This is generated only if code exists that is common to both the client and the server side, usually faults. The contents of the common directory are compiled into a unique library and will be used by the client and server directories.
These directories contain only code that should not be edited by the user, such as the client proxy, the server skeleton, and data objects.
The Conf Directory
The conf directory contains all configuration files and a set of deployment makefiles. Typical configuration files include:
 
client-handlers.xml
client-objects.xml
client-transports.xml
transports.xml
<servicecontextname>_handlers.xml
<servicecontextname>_objects.xml
<servicecontextname>_web.xml
makefile
makefile_debug
The types of configuration files generated depends on the contents of your WSDL or schema, as well as options used during code generation. For example, if you generated code using a WSDL containing a notification message pattern, the client-objects.xml file is generated; otherwise, it is not present.
For general information on the configuration files, see “Customizing the Service Configuration Files.”
The Docs Directory
The docs directory contains all generated HTML documentation files. While this directory is sorted into similar subdirectories -- client, data, and server -- all documentation is most easily accessed by the top-level index.html file:
 
docs\
index.html
The Include Directory
The include directory contains all include files generated by the project organized into project name and namespace directories, as follows:
 
include\
<projectname>\
fwd.h
pkgdefs.h
MyService_typesConverter.h
MyServiceBase.h
MyServiceProxy.h
MyServiceSkeleton.h
<namespace_tag>\
DataType.h
DataTypeMarshal.h
Note the inclusion of two include files that are unique to the project. These are:
fwd.h. Forward declares all generated classes.
pkgdefs.h. Specifies all build macros needed for DLL exporting and importing.
The directory namespace_tag is optional, depending on whether the project includes a schema and therefore datatypes are generated. If so, those header files will be placed under a separate subdirectory according to namespace.
The Lib Directory
The lib directory contains all of .lib and .so files. For example:
 
lib\
*.lib
*.so
For more information on makefiles and compiling your applications, see Chapter 22, “Options for Compiling.”