Using an action list, method, or LJO method in an operationAdded by IBM on June 28, 2011 | Version 1 (Original)
|Follow these steps to use an action list, method, or LJO method in an operation.
Follow these steps to use an action list, method, or LJO method in an operation.
- Place a Service Definition builder in a model to hold the operation you want to add.
The model must also contain the desired action list, method, or LJO you want to use. The Service Operation builder supports the following types of method arguments and return values:
Arguments can be empty, a single IXml argument, or multiple simple types (String, int/Integer, double/Double, and so on) You cannot, for example, have multiple IXml arguments, any complex Java object arguments, or a combination of IXml and simple type arguments.Return values
Return can be void (no results) or IXml.Note:
For XML inputs or results, you must have a schema in the WebApp that defines the structure you want. The schema can be created with a builder such as Schema or Simple Schema Generator, or you can use any schema in the WebApp that was created by any other builder.
- Add a Service Operation builder to the model and for Operation Name, and enter the name you want to use for your operation.
For Action To Call, look under Methods and select the action to call.
- Next, configure your operation's inputs.
You will have three possible choices:
Method has no arguments
Select No inputs for Input Structure Handling.Method has a single IXml argument
In the Input Schema field, provide a schema type for the data. You can reference any schema in the WebApp.Method has multiple simple arguments
Select either Use structure from called action, which will generate a schema from the arguments, or Specify input schema, which lets you map your new operation inputs to the called methods inputs.
- If your operation has results, specify the schema structure in the Result Schema field.
You can reference any schema in the WebApp.
Parent topic: Working with data services