TraderEJBClient.jws Sample

A web service that demonstrates use of the EJB control TraderEJBControl.jcx, which represents the TraderEJB Stateless Session Bean and exposes its business interface to web services.

Concepts Demonstrated by this Sample

Location of Sample Files

This sample is located in the ejbControl folder of the WebServices project in the SamplesApp sample application. In the file system the location is:

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\ejbControl\TraderEJBClient.jws

To Run the Sample

  1. Start WebLogic Server in the appropriate domain.
  2. Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebServices/ejbControl/TraderEJBClient.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine and you have deployed the SamplesApp sample application, you may click here to run the sample.
  3. Navigate to the Test Form tab of Test View, if necessary.
  4. Enter values for tickerSymbol and numberOfShares in for either the buy or sell method and invoke the method.
  5. Click the Message Log title to return to the methods.
  6. Note: TraderEJB, the EJB that is represented by TraderEJBControl, is a Stateless Session Bean and therefore does not store any information. Its sole purpose is to qualify transacations: it limits all transactions to 500 shares.

  7. Examine the TraderEJBClient.jws and TraderEJBControl.jcx files to explore the relationship between the control and its client. The TraderEJBControl.jcx file was created using the Add EJB Control dialog.
  8. Select log entries in the Message Log to see the message traffic involved in each interaction.

Related Topics

AccountEJBClient.jws Sample

Using WebLogic Built-In Controls

EJB Control

Testing Your Application with Test View