Walk through the code
Now that the application is running, let's walk through the code.
- The web application is wired using the web.xml
- The web service functionality is provided through the Apache CXF - CXFServlet, this servlet takes care of handling the web service request and sending the calls to the corresponding end points defined using annotations and configured using spring
- Rest of the application code is wired through Spring 2.5.6 using application-context.xml
-
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>HelloWebService</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:application-context.xml</param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <servlet-name>CXFServlet</servlet-name> <display-name>CXF Servlet</display-name> <servlet-class> org.apache.cxf.transport.servlet.CXFServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app>
- Tags:
Who's online
There are currently 0 users and 1 guest online.
Who's new
- Saravana Peruma...
Recent comments
29 weeks 4 days ago
33 weeks 30 min ago
47 weeks 3 days ago
49 weeks 5 days ago
1 year 6 weeks ago
1 year 37 weeks ago
2 years 13 weeks ago
2 years 14 weeks ago