Exposing an operation and using it in a service consumer modelAdded by IBM on June 28, 2011 | Version 1 (Original)
|You can expose an operation in a service provider model and use it in a service consumer model.
You can expose an operation in a service provider model and use it in a service consumer model.
- Create a model that provides functionality that you want to expose as a service.
An example might be a method that returns a list of records from a back end database, such as SAP or PeopleSoft.
The model should provide a method (that may or may not take arguments) that returns the desired data. The returned data can be directly returned from the method, or placed in a known schema-typed variable.
- Add a Service Definition builder to your model and a Service Operation builder for each method you wish to expose.
- Save and close the Service Provider model.
- Create or open an existing model that you want to have consume the service.
- In this Service Consumer model, add a Service Consumer builder and select the provider model and, optionally, the operation.
The Service Consumer builder adds a Data Service and local methods to your model that can be used to invoke the service. The service inputs and outputs are exposed as Variables.
- Add builders to your model to invoke the service operation and process the output.
- Use a high-level builder, such as the View & Form builder, to invoke a service operation, and display its data.
- In the View & Form builder, use the View Method input to select the Data Service operation DataService/consumer builder name/operation name (for example, DataServices/orders/getOrders).
Parent topic: Service Consumer builder