Service Development Help : Building Java Services : Adding Classes to the Service Development Project
Adding Classes to the Service Development Project
If a Java 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 set up IS package dependencies for a Java service in Integration Server and there are classes and/or jar files in the IS packages required so that the service can compile, you must manually add them 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 Java service.
Service Development Project names use the following format, where packageName is the name of the IS package where the service resides, hostName is the host name of the Integration Server on which the service resides, and portNumber is the port number of the Integration Server:
<packageName>[<hostName>_<portNumber>]
For example, if you want to add class and jar files for the order.orderStatus:checkStatus service that resides in the IS package “Accounting” on the Integration Server with the host name and port number “ServerA:5555”, you would expand the Service Development Project with the following name:
Accounting[ServerA_5555]
For more information, see Service Development Projects in the Local Workspace.
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:  
The Java source files for these classes should not be maintained 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 errors from the Problems view. However, the errors might still exist for the Folder class that resides in Integration Server. To correct the error, ensure Integration Server has access to the required class and jar files, open the Java service in the Designer, and save it again to force the compilation of the service on Integration Server.
Overview of Building Java Services
Service Development Projects in the Local Workspace
Creating a Java Service
Editing an Existing Java Service
Compiling a Java Service
Copyright © 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback