Designer 10.7 | webMethods Service Development Help | Building C/C++ Services | Adding Classes to the Service Development Project
 
Adding Classes to the Service Development Project
If a C/C++ service requires additional classes to compile, you must add them to the following locations:
*Service Development Project in the local workspace so that Designer can compile the service.
*Integration Server so that the server can compile the service. Designer does not automatically propagate classes that you add to the Service Development Project to Integration Server; you must add them to Integration Server manually. For more information about adding classes to Integration Server, see information about managing IS packages and how Integration Server stores IS package information in webMethods Integration Server Administrator’s Guide.
Keep the following points in mind when adding classes to the Service Development Project:
*You add individual class files to the “classes” folder of the Service Development Project.
*If you have Java classes that are packaged together in jar files, you add the jar files to the “lib” folder of the Service Development Project.
*If you have set up IS package dependencies for a C/C++ service and if the service requires classes or jar files in these IS packages to compile, you must manually add the classes or jar files to Service Development Project.
*To add classes and jar files to the Service Development Project
1. Open the Project Explorer view.
2. Expand the Service Development Project for the C/C++ service.
3. If you want to add class files to the Service Development Project, drag them from the file system into the “classes” folder of the Service Development Project in the Project Explorer view.
When adding class files, ensure that you keep the structure of the Java package intact. For example, if you want to add com.accounting.orders.statusClass.class, you must first create the “com”, “accounting”, and “orders” folders within the “classes” folder as shown below:
- classes
- com
- accounting
- orders
Then add the statusClass.class file to the “orders” folder.
Important:
Do not maintain the Java source files for these classes within the Service Development Project.
4. If you want to add jar files to the Service Development Project, drag them from the file system into the “lib” folder of the Service Development Project in the Project Explorer view.
If you have the Build automatically Workspace preference selected, after adding new class and/or jar files to the Service Development Project, Designer automatically rebuilds the project. If you have the Build automatically preference turned off, you can force a rebuild by selecting Project > Build Project. You set the Build automatically preference using Window > Preferences > General > Workspace.
After the project is rebuilt, Designer removes the compilation errors, if any, from the Problems view. However, the errors might still exist for the Folder class that resides in Integration Server.
To correct the error, first, ensure that Integration Server has access to the required class and jar files. Then, open the C/C++ service in the Designer and save it again to force the compilation of the service on Integration Server.