How to use SourcePro with LEIF

Article ID: 1236
Last updated: 01 Sep, 2009
Article ID: 1236
Last updated: 01 Sep, 2009
Revision: 1
Views: 1434
Posted: 04 Oct, 2005
by --
Updated: 01 Sep, 2009


This article will explain the necessary steps to use SourcePro with LEIF 2.x.  Please note; the version of SourcePro is a full product version and not the SourcePro binaries that are shipped with LEIF.  

There are there three main sections; the first explains how to integrate LEIF and SourcePro when both the libraries are built with exactly the same build options, so they have the same build tag.  In the second section, we explain the additional changes which must be applied if the build tags of the libraries are different.  So for example in this case, you may be using a 12d (release dynamic) version of LEIF with a 15d (debug dynamic) of SourcePro.

In the third and final section, we detail the extra steps required to use SourcePro version 3 with LEIF 2.x.  Please note; steps 1 and 2 are for versions SourcePro 4 and above and SourcePro versions 1 and 2 are not covered in this article. 


Using the -SourcePro flag, LEIF allows you to generate code which uses SourcePro components.  If you are a SourcePro customer, you may extend your applications through any additional SourcePro products that you own; or you may simply want to use LEIF with an older/newer full product release of SourcePro.

Please note; LEIF 2.0-2.2 are shipped with SourcePro 6.


Section 1

The version of SourcePro which will be used with LEIF must be compatible with LEIF and in some cases, a new buildspace will have to be created.  The LEIF 2.2 User Guide (Appendix A1) explains in detail how to create a buildspec using RCB for SourcePro 6.

Windows example:

Using your wsdl or schema, generate code and edit the generated makefile as follows:

1. Change the BUILDSPACE variable to point to the SourcePro installation directory.


2. Add a RW_HOME variable to point to the LEIF installation directory.


3. Edit the include line:  


4. Edit the linker flags:


5. And archiver flags:


6. Update the location of the LEIF libraries 


7. And compile the code.

Please note the makefile lines above are for illustration purposes only and are from a Windows/MSVC 6.0 makefile.

Section 2

Below are the additional changes which need to be made if the build options (build tag) for SourcePro is different from that of LEIF.

1. Change the SBTAG to the build tag of SourcePro (for example: 15d) 

2. Change -D_RWCONFIG=$(SBTAG) to:


3. Edit all XSDREQLIBS, XSDLINKLIBS, WSDL_REQLIBS, WSDL_LINKLIBS so file names are correct.  

For example:


will need to be changed to


4. Ensure the LEIF include paths use RW_HOME and the SourcePro paths use BUILDSPACE

Note: the includes should put the SourcePro (BUILDSPACE) files before the LEIF (RW_HOME) files.

Section 3

1. Add the rwerr.h header file as follows to the <myProject>NotificationSkeleton.cpp and <myProject>Skeleton.cpp.

"#include <rw/rwerr.h>" 

Recent version of LEIF includes this file  implicitly, but it must be explicitly specified for SourcePro Edition 3.  So for example, if you were working with the forecast example provided in the <LEIF-install-dir>examples soapworxForecast, you would need to include the above header in ForecastNotificationSkeleton.cpp and ForecastSkeleton.cpp.

2. The following changes must be made in the generated makefile

2a. add "-DNOMINMAX -DWIN32 -Zc:wchar_t" to the CPP_FLAGS macro. "-Zc:wchar_t" may only be required for Rogue Wave standard library builds.

2b. add "std$(SBTAG).lib" to the WSDL_LINKLIBS macro. (This is only required for RogueWave standard library).

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1236
Last updated: 01 Sep, 2009
Revision: 1
Views: 1434
Posted: 04 Oct, 2005 by --
Updated: 01 Sep, 2009 by

Others in this category