WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
Example of a service interface
A Service in WebSphere® Message Broker is a specialized application with a well-defined interface, and implementation flows for each service operation. This example shows a service interface.
Read the concept information about Services.
In the screen capture that follows, an interface has been created for a credit report. This is the interface to a component that will send a balance of a customer's account and get the approval for a transaction, get the history of the customer's account, and then update the customer's credit rating. getApproval and getHistory are request-response operations. updateCreditRating is a one-way operation.
The following parts of the credit report interface are shown in
the interface editor:
- Request-response operation
- getApproval, when invoked, sends the balance
of customer account and gets the approval for a transaction. getApproval contains
the following inputs, outputs, and faults:
- Input: getApproval sends as input the variable balance. The variable balance must have a double data type.
- Output: getApproval returns as output a variable named approval. The variable approval contains a string recommending approval (if funds are sufficient to justify granting credit) or rejection (if funds are not sufficient to extend credit to the applicant).
- Faults: getApproval may return one of two faults, both of which are strings describing an error condition: timeout is returned if the service waits for an excessive amount of time to determine approval; systemFailure is returned if there is communication or power failure.
- Request-response operation
- getHistory, when invoked, sends the name of a
customer account and gets the history of the customer's transactions. getHistory contains
the following inputs, outputs, and faults:
- Input: getHistory sends as input the variable customerName. The variable customerName must have a string data type.
- Output: getHistory returns as output a variable named customerPastHistory. The variable customerPastHistory contains a string with a record of past transactions.
- Fault: getHistory may return one of two faults, both of which are strings describing an error condition: timeout is returned if the service waits for an excessive amount of time to determine approval; systemFailure is returned if there is communication or power failure.
- One-way operation
- updateCreditRating when invoked sends the current
credit rating of the customer. updateCreditRating has
the following inputs:
- Input: updateCreditRating sends as input the variable currentRating. The variable currentRating must have a string data type.
For an example of how to develop this interface from scratch, see Developing a service interface.