Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Building C/C++ Services | Building the C/C++ Source Code
 
Building the C/C++ Source Code
When you create a C/C++ service, Designer generates a source code file and a make file and places these files in the following directory:
Integration Server_directory \instances\instance_name\packages\packageName\code\source
The names of the files will match the service name you specified in Designer. The source code file will be named <servicename>.c and the make file will be <servicename>.mak.
You create the C/C++ program in the serviceNameImpl.c file, not the original file. The serviceNameImpl.c file is the file in which the make file expects to find your source code. This step is taken to maintain a copy of the original source file to which you can refer, or revert to, during the development process.
*To build the C/C++ source code
1. Locate the source code and make files. The source code file will be named <servicename>.c and the make file will be <servicename>.mak.
2. Copy the source code file to a new file (in the same directory) with the following file name:
serviceNameImpl.c
For example, if your service name is PostPO, you would create a copy of PostPO.c and name it PostPOImpl.c.
3. Edit the serviceNameImpl.c file as necessary to build your service.
This file contains instructive comments that will guide the development process. You can also refer to webMethods Integration Server C/C++ API Reference for information about how to use the webMethods C/C++ API to make the data in your service available to other services.
4. Edit the make file to customize it for your development environment. Set the following path settings:
Set...
To...
JDKDIR
The directory that contains the Java Development Kit.
SEVRDIR
The directory in which webMethods Integration Server is installed.
Important:
The source code file serviceName.c contains code based on the specification you used to define the inputs and outputs for the service. If you edit the specification, you need to regenerate the source code file. Designer does not update the serviceName.c file automatically. For more information about generating source code files for a C/C++ service, see Creating a C/C++ Service.
5. After you finish coding your service, run your make file to compile it. Following is a typical make command:
make –f SalesTax.mak
The make file compiles your program and puts the finished DLL in the code\libs directory in the package in which the service resides. If this directory does not exist when you run the make file, your program will not compile successfully.
6. Once your program compiles successfully, restart Integration Server to reload the code\libs directory. This makes the service available for execution and allows you to test it with Designer. For details on testing, see Debugging C/C++ Services.