Calling Application Platform Services from Integration Server Services
Integration Server allows you to have Integration Server (IS) services that call Java source files in Application Platform by attaching annotations to methods in Application Platform. When you publish projects that contain these annotated methods to Integration Server, IS service bindings are created, which can be invoked in Integration Server flow services, or executed by Integration Server Java services.
When you expose Java methods to Integration Server, you must use annotations in order to mark the specific method(s) to expose. This section provides an overview of the required functional steps.
To call Application Platform services from IS services
1. Annotate a method by marking the class and method with the necessary annotations. The following class annotations are available:
Method | Description |
@Service | Use the @Service class annotation to identify the class as a service, so that it can be included in the server's OSGi service registry. |
@ExposeToIS | Use the @ExposeToIS class annotation to provide additional details for Integration Server. |
@ExposedMethod | Use the @ExposedMethod method annotation to identify the method to be used when creating an IS service. |
Example:
@Service(name=”OrdersService”, interfaces =
{“com.softwareag.demo.orders.api.OrdersService”})
@ExposeToIS(packageName=”OrdersService”)
public class OrdersServieImpl implements OrdersService {
Method
@Override
@ExposedMethod
public String createReceiptEntry(LineItem inItem) {
2. Publish your project.
When the project's bundle is assembled, it will contain additional metadata to be used by Integration Server when creating IS service bindings.
3. Verify that the Integration Server package you provided in step 1 with the @ExposeToIS annotation exists, and that it contains the proper service signatures.
Related Topics