KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > webservice > environment > TestEJBRef


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: TestEJBRef.java 980 2006-07-28 13:20:32Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.webservice.environment;
26
27 import java.net.URL JavaDoc;
28
29 import org.objectweb.easybeans.tests.common.resources.ItfWSUtil;
30 import org.objectweb.easybeans.tests.common.resources.WSUtilCeltix;
31 import org.objectweb.easybeans.tests.common.ws.ejbref.gen.ItfChecker;
32 import org.testng.annotations.BeforeMethod;
33 import org.testng.annotations.Test;
34
35 /**
36  * Verifies if the EJB references injection is following the JSR 220.
37  * @reference JSR 220-PROPOSED FINAL - 16.5
38  * @requirement Tomcat running in the port 8080 with embedded EasyBeans;
39  * (Ant task: install.jar.tests.ejb.reference.webservice)
40  * @author Gisele Pinheiro Souza
41  * @author Eduardo Studzinski Estima de Castro
42  */

43 public class TestEJBRef {
44
45     /**
46      * WS instance.
47      */

48     private ItfChecker instance;
49
50     /**
51      * WS Util.
52      */

53     private ItfWSUtil ws = new WSUtilCeltix();
54
55     /**
56      * Gets the instance used in the test.
57      * @throws Exception if there is a problem with the bean initialization.
58      */

59     @BeforeMethod
60     public void startUp() throws Exception JavaDoc {
61         instance = ws.getPort(new URL JavaDoc("http://localhost:8080/ow_easybeans/services/EjbRefService/"),
62                 "http://objectweb.org/easybeans/tests/common/ws/ejbref/gen",
63                 "SOAPService", ItfChecker.class, "SoapPort");
64     }
65
66     /**
67      * Checks if the annotation @EJB is working properly. A webservice is used to access the bean.
68      * @throws Exception if a problem occurs.
69      */

70     @Test
71     public void test00() throws Exception JavaDoc{
72         instance.check();
73     }
74 }
75
Popular Tags