KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > wstest > TestWebServiceImpl


1 package wstest;
2
3
4 /**
5  * This is the implementation bean class for the TestWebService web service.
6  * Created 26.4.2005 17:06:24
7  * @author lm97939
8  */

9 public class TestWebServiceImpl implements TestWebServiceSEI {
10     
11     
12     // Enter web service operations here. (Popup menu: Web Service->Add Operation)
13
/**
14      * Web service operation
15      */

16     public String JavaDoc testOperation() throws java.rmi.RemoteException JavaDoc {
17         return lookupTestSessionBean().testMethod();
18     }
19
20     private test.TestSessionLocal lookupTestSessionBean() {
21         try {
22             javax.naming.Context JavaDoc c = new javax.naming.InitialContext JavaDoc();
23             test.TestSessionLocalHome rv = (test.TestSessionLocalHome) c.lookup("java:comp/env/ejb/TestSessionBean");
24             return rv.create();
25         }
26         catch(javax.naming.NamingException JavaDoc ne) {
27             java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
28             throw new RuntimeException JavaDoc(ne);
29         }
30         catch(javax.ejb.CreateException JavaDoc ce) {
31             java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce);
32             throw new RuntimeException JavaDoc(ce);
33         }
34     }
35 }
36
Popular Tags