Calling Application Platform Services from My webMethods Server Services
My webMethods Server provides 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 My webMethods Server, My webMethods Server service bindings are created.
When you expose Java methods to My webMethods 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 My webMethods Server 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 it can be included in the server's OSGi service registry. |
Example:
@Service(name=”OrdersService”, interfaces =
{“com.softwareag.demo.orders.api.OrdersService”})
2. Publish your project.
When the project's bundle is assembled, it will contain additional metadata to be used by My webMethods Server when creating service bindings.
Related Topics