Jan 27th, 2011, 11:32 AM
Spring 3 + Axis2 Web Service 101 - Easy question (probably)
I'm building a web application with Spring MVC. The project also requires web service access to some functionality of this application (authentication, send/receive some data...). I'm completely new to web services, so maybe some helpful soul can shed some light.
I just want to know if this is possible:
1.- Have my web app deployed in a server (Tomcat), so users can use it: log in, put data in forms etc.
and 2.- Expose a service within this application as a web service, using Axis2 (Axis2 is a client requirement), so I can reuse the code of the web app.
Or put it in another way: can I have a web application + web service with a single deployment unit, or do I have to deploy the webapp WAR and the service separately? If they have to be separated, can I access my application context (beans) from the Axis2 service, provided that both are deployed at the same server?
Sorry if what I'm asking does not make sense, I'm really lost.
Jan 27th, 2011, 06:18 PM
Why is Axis2 a client requirement?
If you're using Spring MVC already, you can reuse your code with Spring WS instead. You can deploy both Spring MVC and Spring WS on the same app.
Take a look at the following tutorial http://krams915.blogspot.com/2010/12...ing-3-mvc.html