01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.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: JaxRpcEndpoint.java 4752 2004-05-13 13:38:11Z sauthieg $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.wssample.servlets.ws;
25:
26: import org.objectweb.jonas.common.Log;
27:
28: import org.objectweb.util.monolog.api.BasicLevel;
29: import org.objectweb.util.monolog.api.Logger;
30:
31: /**
32: * Service implementation of JaxRpcEndpointInterface. This class is a JaxRpc
33: * endpoint. It is declared in the web.xml. And it will run inside the web
34: * container.
35: *
36: * Notice that a default class constructor is REQUIRED.
37: * Notice that JaxRpcEndpoint does not implements JaxRpcEndpointInterface
38: * This is not a requirement.
39: *
40: * This JAXRPC service endpoint class may implements <code>javax.xml.rpc.server.ServiceLifecycle</code>
41: * interface.
42: *
43: * @see org.objectweb.wssample.servlets.ws.JaxRpcEndpointInterface
44: *
45: * @author Guillaume Sauthier
46: */
47: public class JaxRpcEndpoint {
48:
49: /**
50: * return value of getCotes()
51: */
52: private static final int GET_COTES_VALUE = 12;
53:
54: /**
55: * logger
56: */
57: private static Logger logger = Log.getLogger(Log.JONAS_WS_PREFIX);
58:
59: /**
60: * default constructor needed for JaxRpc Service Endpoint.
61: */
62: public JaxRpcEndpoint() {
63: }
64:
65: /**
66: * @param name String to append to "Hello "
67: * @return Returns "Hello " + name
68: */
69: public String sayHello(String name) {
70: logger.log(BasicLevel.INFO, "sayHello(" + name + ") invoked.");
71: return "Hello " + name;
72: }
73:
74: /**
75: * @return Returns an arbitrary integer
76: */
77: public int getCotes() {
78: logger.log(BasicLevel.INFO, "getCotes() invoked.");
79: return GET_COTES_VALUE;
80: }
81:
82: }
|