O'Reilly logo

Java™ Web Services Unleashed by Mark Wutka, Joseph Weber, Arthur Ryman, K. Scott Morrison, Benoît Marchal, Matthias Kloppmann, Steven Haines, Darren Govoni, Francisco Curbera, Frank Cohen, Robert Brunner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required