Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
LEIF User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

5.3 Invoking the Generator

In this section, we will use the following steps to generate code from the HelloWorld.wsdl file.

  1. Set up your environment as described in Chapter 3.

  2. Open a command prompt, and change to the installdir\examples\webservices\HelloWorld directory, as shown below:

    Win32

    cd %RWLEIF_HOME%\examples\webservices\HelloWorld
    

    UNIX/Linux

    cd $RWLEIF_HOME/examples/webservices\HelloWorld
    
  3. Generate code by running leifgen with the name of the WSDL file and the project name.

  4. Note: You may also generate code using as a sole argument the provided LEIF project file example-project.xml, as follows:

    Using this file results in exactly the same generated code as the above invocation. For more information on the use of LEIF project files in the shipped examples, see Section 1.5.1.

LEIF creates a project titled HelloWorld including client and service-side code, client and service sample applications, makefiles and MSVC project files, and places all files into the specified project directory HelloWorldExample.

These files are generated into several subdirectories, according to LEIF's standard project directory hierarchy. For more information on the directory structure, see Section 11.3, "The Project Directory." Table 6 lists the generated files for the Hello World example.

Note: LEIF supports only file paths without spaces, so when creating your directory names and structure, do not include spaces.


NOTE -- Files that are overwrite-protected will be generated with a ".sample" extension if a file exists in the output directory of the same name. See Section 10.7, "Overwrite Protection."

Table 6: Files generated for the HelloWorld example

Directory Files Description
HelloWorldExample/
HelloWorldExample.xml

The project file defining all project elements (options, configurations, schemas, WSDLs, etc.). See Section 11.2.


makefile 
makefile_debug

Project-level makefiles. These call all makefiles in subdirectories. Overwrite-protected.


makefile.include

Include makefile. Contains all makefile compiler and linker options. Edits to this file cascade to all makefiles. Overwrite-protected.


HelloWorldExample.dsw or
HelloWorldExample.sln

MSVC 6 workspace or MSVC 7 solution files. Generated for Windows platforms, depending on value of -projectversion flag. See Section 10.6.


deployDebug.bat deployRelease.bat

Convenience debug and release deployment batch files generated for use with MSVC projects.

    app/
makefile 
makefile_debug

Makefiles. Builds contents of app/ directory. Overwrite-protected.

        /client
GreetingPortClient.cpp

Sample client implementation using the client proxy. Overwrite-protected.


makefile
makefile_debug

Makefiles. Builds contents of app/client directory. Overwrite-protected.


[GreetingPortClient.dsp or
GreetingPortClient.vcproj]

MSVC6 or MSVC7 project files generated for Windows platforms.

        /server
GreetingPortTypeImp.cpp
GreetingPortTypeImp.h

Sample service implementation and header files. Derives from
GreetingBase. You can implement your service by implementing the methods of this class, or you can derive your own class from
GreetingBase. Overwrite-protected.


makefile
makefile_debug

Makefiles. Builds contents of app/server directory. Overwrite-protected.


[<GreetingPortService.dsp or
<GreetingPortService.vcproj]

MSVC6 or MSVC7 project files generated for Windows platforms.

    codegen/
makefile 
makefile_debug

Makefiles for codegen directory. Overwrite-protected.

        /client
GreetingBindingProxy.cpp

Implementation file for the generated client proxy class


makefile
makefile_debug

Makefiles. Builds contents of codegen/client directory. Overwrite-protected.


[<GreetingBinding.dsp or
<GreetingBinding.vcproj]

MSVC6 or MSVC7 project files generated for Windows platforms.

        /server
GreetingBindingSkeleton.cpp
GreetingPortTypeBase.cpp

Implementation files for the class that handles messaging and the base class for the server-side implementation.


makefile 
makefile_debug

Makefiles. Builds contents of codegen/server directory. Overwrite-protected.


[GreetingPortService.dsp or
GreetingPortService.vcproj]

MSVC6 or MSVC7 project files generated for Windows platforms.

    conf/
transports.xml
client-transports.xml

Configuration files for:
1. Server and client transports


helloworld_handlers.xml

2. Server-side handlers to support handler chaining and configuration


client-handlers.xml

3. Client-side handlers containing default client logger


helloworld_objects.xml

4. Server-side named objects required by this service. These are registered and created when the container is started.


client-objects.xml

5. Client-side named objects.


helloworld_web.xml

6. Deployment XML file for the service.


makefile 
makefile_debug

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:

     /HelloWorldExample

subdirectory <projectname>


GreetingBindingProxy.h

Client proxy class


GreetingBindingSkeleton.h

Class that handles messaging


GreetingPortTypeBase.h

Base class for the server-side implementation.

The generator also produces HTML documentation. The generator may produce other support files. The generator uses the support files while generating code, but the files are not required for compiling and running the generated code.

For other Web services, additional files may be generated; see Chapter 10 for more information on topics such as generating with datatypes, faults, and using multiple WSDL and XML Schema files.



Previous fileTop of DocumentContentsIndex pageNext file

©2003-2005 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.