About this task
A service in
IBM® Integration Bus is
a specialized application that contains a web services solution. It
defines an interface with operations that are implemented as separate
subflows. The following example shows how to create an interface and
define operations. The complete interface is explained in
Example of a service interface.
Procedure
- Open your integration service in
the Service editor by double-clicking the Service Description in
the Application
Development view, or by right-clicking
and selecting Open.
- Display the service interface by switching to the Interface tab
in the Service editor.
- A default request-response operation, operation1,
is created when the service is created. Rename operation1 to getApproval.
- Rename the inputs and outputs, and edit the types.
- Rename input1 to balance.
In the Type field, select the default, string.
From the context menu, select double. The
type is changed.
- Change output1 to approval and
the leave the type as string.

- Add two faults to getApproval using the Add
Fault icon: a timeout fault with a string type
and systemFailure, also with a string type.

These faults will appear in
the properties of bindings which use your interface. You can then
implement the faults with fault selectors.
- Add another request-response operation by clicking the Add
Request Response Operation icon, or right-clicking and
selecting from the context menu. A request-response operation with
an input and an output is created. called getHistory with
an input of customerName with a string type
and an output of customerHistory with a string type.
Select the string type of customerHistory and
change the Name field to customerPastHistory.

- Add the same timeout and systemFailure faults
in this operation as the previous one. These faults would return error
messages for timeout conditions or a system failure.
- Add a one-way operation called updateCreditRating,
either from the icons by selecting Add One Way Operation or
right-clicking the canvas area in the interface editor and selecting
from the context menu. Rename the input to currentRating with
a string type. One-way operations send only an input
as there is no response required.

What to do next
Implement the operations defined in the
integration service as separate subflows.
For more information, see
Implementing an integration service operation.