geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinath Perera <hemap...@gmail.com>
Subject Writing dummy Servlet to redirect HTTP/SOAP requests
Date Wed, 15 Dec 2004 05:06:17 GMT
Hi All;
I like to write a dummy Servlet that would look like this
	Public class Dummy implements HTPServlet,GBeanLifeCycle{
		final AxisGBEan axis
 static {
        		GBeanInfoBuilder infoFactory =  ...

        	infoFactory.addReferance("Axis", AxisGBean.class);

       	 	infoFactory.setConstructor(new String[]{"Axis"});
       		 GBEAN_INFO = infoFactory.getBeanInfo();
    		}

public ConstructorInjectionGbean(AxisGBean axis )     {
			this.axis = axis;
}

		Public void doPost(HttpRequest req,HttpResponse res){
			axis.processSOAPMesage(req,rsp);
}
}
Will this work? As usually servlets do sandboxing and does the usual
Geronimo services applicable inside the Servlet to inject the
AxisGBean. [If constructor is a problem we can use getter setter
injection]

What I want to achieve with this is to make it possible to deploy each
WS in Geronimo with own web.xml file; Axis is a Servlet and have a one
web.xml to all the Web Services. I had a chat about this with Jeremy
sometime ago and following his pointers . I am trying to create a
Dummy Servlet for each Web Service and deploy the Servlet with own
web.xml file and when the SOAP request comes it is redirected Axis
with the security and transaction contexts set in to the Thread!!

There is a another advantage of this approach that I would be able
rewrite   Axis deployment registry with GBeans and using a reference
patterns when ever a Web Service application GBean start up it will
injected to the Registry. That means we can have a much Geronimo like
deployment for Axis (I am doing a SOAP call now) and would be able to
start stop each web service by start stopping GBean corresponding to
the Web Service.
Thanks
Srinath

Mime
View raw message