The StockTrading SOAP Object
The StockTrading object is a SOAP object that doesn't really use SOAP at all. It uses a Hashtable to associate randomly-generated user session tokens with their corresponding EJB session objects. The Trading EJB does most of the actual work; the StockTrading object just passes most of the calls through to the EJB.
The three methods that don't rely on the Trading object are login, logout, and getTradingSession. When a user logs in, the StockTrading object creates a new instance of a Trading session. If the user supplies an incorrect userid or password, the create method in the TradingHome interface throws an exception. Otherwise, the StockTrading object creates a random 128-bit session key and associates it with the ...
Get Java™ Web Services Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.