using an application's Servlet as "Endpoint"

From: CM Adler <adlercm_at_HOTMAIL.COM>
Date: Thu, 11 Apr 2002 11:51:36 -0600

We are planning on exposing some functionalities of our existing web application which is front-ended by a MainServlet, which 1) can directly forward/include other servlets; 2) or can directly connect to other javabeans; 3) and/or directly connect EJB?s. We would like that the functionalities be logically invoked as Web Services, by using JAX-RPC as the facility. We still would like to keep the MainServlet and the other existing modules of the web application. Assuming that the runtime is servlet-based, using JAXRPCServlet, 1) can the MainServlet be converted to be the ?service endpoint class?? OR 2) do we have to create a class (that implements ?ServiceLifecycle?) which will then ?forwards? to our MainServlet? OR 3) can the MainServlet implement ServiceLifeCycle?
    Any ideas would be greatly appreciated. Thanks.