axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Fernau <>
Subject how to embed axis2 using jetty as http-server?
Date Thu, 28 Oct 2010 16:13:10 GMT

I try to find a way to use the axis2 engine with my embedded jetty-server. 
There must be a solution for this - but I can't find a way to get it to work.

I want to add webservices _programmatically_ - I don't want to use aar-Files 
for deploying. What I have so far:

1) I can embed axis2 in my application using SimpleHTTPServer and 
programmaticly add webservices using the ConfigurationContext object. But this 
way I need to use the SimpleHTTPServer which I don't want to.
2) I can use the embedded Jetty-Server and deploying axis2 like this:
--- cut
Server server = new Server(8080);		 
ServletContextHandler context = new

AxisServlet axis = new AxisServlet();
ServletHolder sh = new ServletHolder(axis);
sh.setInitParameter("axis2.repository.path", "/some/where/repo");
--- cut
This way axis2 require a repository at "/some/where/repo". There I need to 
have the 'services' directory where I can place my aar-files. Axis will 
recognize the aar-files and add them during runtime. This works but this isn't 
what I want to have.

I need to develop a server for our application which needs to be extensible 
with plugins. These plugins needs to be able to add functionality to the 
server like adding a new servlet (thus I need to use jetty which allows me to 
programmatically add servlets during runtime) and/or adding a new webservice. 
To be as flexible as possible I try to find a way that I don't need to manage 
external aar-Files.

My question is: Is there a way to embed axis2 like I did with example 1 but 
use embedded jetty as http-server like I did in example 2??

Best Regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message