01: /**
02: * EasyBeans
03: * Copyright (C) 2006 Bull S.A.S.
04: * Contact: easybeans@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 1970 2007-10-16 11:49:25Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.tests.webservice.environment;
25:
26: import java.net.URL;
27:
28: import org.ow2.easybeans.tests.common.resources.ItfWSUtil;
29: import org.ow2.easybeans.tests.common.resources.WSUtilCeltix;
30: import org.ow2.easybeans.tests.common.ws.ejbref.gen.ItfChecker;
31: import org.testng.annotations.BeforeMethod;
32: import org.testng.annotations.Test;
33:
34: /**
35: * Verifies if the EJB references injection is following the JSR 220.
36: * @reference JSR 220-PROPOSED FINAL - 16.5
37: * @requirement Tomcat running in the port 8080 with embedded EasyBeans;
38: * (Ant task: install.jar.tests.ejb.reference.webservice)
39: * @author Gisele Pinheiro Souza
40: * @author Eduardo Studzinski Estima de Castro
41: */
42: public class TestEJBRef {
43:
44: /**
45: * WS instance.
46: */
47: private ItfChecker instance;
48:
49: /**
50: * WS Util.
51: */
52: private ItfWSUtil ws = new WSUtilCeltix();
53:
54: /**
55: * Gets the instance used in the test.
56: * @throws Exception if there is a problem with the bean initialization.
57: */
58: @BeforeMethod
59: public void startUp() throws Exception {
60: instance = ws
61: .getPort(
62: new URL(
63: "http://localhost:8080/ow_easybeans/services/EjbRefService/"),
64: "http://objectweb.org/easybeans/tests/common/ws/ejbref/gen",
65: "SOAPService", ItfChecker.class, "SoapPort");
66: }
67:
68: /**
69: * Checks if the annotation @EJB is working properly. A webservice is used to access the bean.
70: * @throws Exception if a problem occurs.
71: */
72: @Test
73: public void test00() throws Exception {
74: instance.check();
75: }
76: }
|