Adapter for Enterprise JavaBeans 6.5 SP3 | webMethods Adapter for Enterprise JavaBeans Documentation | webMethods Adapter for Enterprise JavaBeans Installation and User’s Documentation | Creating Flows for Adapter for Enterprise Javabeans Services | Working with Different Object Types | Creating Java Services to Use with Objects
 
Creating Java Services to Use with Objects
 
Example 1
Example 2
This section provides two examples that demonstrate how to write simple Java services to get or create the necessary objects, manipulate the properties, and then place the objects on the pipeline within a flow.
*The first example illustrates how to write a service that creates an instance of a user-defined class and then inserts it into the pipeline where it can be passed to an adapter service instance in a flow.
*The second example shows how to extract a user-defined object from the pipeline and transform it into a document.
The EJB and associated classes used in these examples are as follows:
*The target bean is a stateless session EJB-ComplexTrader. Its home interface exposes a create method that takes no arguments and returns an instance of a Trader.
*The Trader object itself exposes two public methods: buy and sell. Each of these has the same signature:
public TradeResult buy (StockOrder order) throws RemoteException;
public TradeResult sell (StockOrder order) throws RemoteException;