Hi Chris, No, you understood my problem correctly. The problem you solved will work for me!
But my question is since, the CXFServlet is the same as the Spring Servlet, can I use the same servlet for both Webserices and spring MVC? Any input to this question will be appreciated. Thanks Matt CMoesel wrote: > > Hi Matt, > > Maybe I'm misunderstanding your question, but I think you just want to > be able to use CXF and Spring MVC in the same application? If that's > it, I've done this simply by mapping the CXFServlet and > DispatcherServlet to two different URL patterns. For example: > > <?xml version="1.0" encoding="ISO-8859-1"?> > > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > > <description>My Web Application</description> > <display-name>My Web Application</display-name> > > <context-param> > <param-name>contextConfigLocation</param-name> > <param-value> > classpath:my-cxf-config.xml > classpath:META-INF/cxf/cxf-servlet.xml > </param-value> > </context-param> > > <listener> > > <listener-class>org.springframework.web.context.ContextLoaderListener</l > istener-class> > </listener> > > <servlet> > <servlet-name>CXFServlet</servlet-name> > > <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-clas > s> > <load-on-startup>1</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>CXFServlet</servlet-name> > <url-pattern>/services/*</url-pattern> > </servlet-mapping> > > <servlet> > <servlet-name>springmvc</servlet-name> > > <servlet-class>org.springframework.web.servlet.DispatcherServlet</servle > t-class> > <load-on-startup>2</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>springmvc</servlet-name> > <url-pattern>/web/*</url-pattern> > </servlet-mapping> > > > <welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file- > list> > > </web-app> > > -Chris > > -----Original Message----- > From: mattmadhavan [mailto:[EMAIL PROTECTED] > Sent: Friday, September 21, 2007 4:00 PM > To: [email protected] > Subject: CXFServlet + WebServices + Spring MVC > > > Hello, > I am currently working on a project for my current client for all > external > notifications. My requirements are as follows: > * Some of my client's partners communicate via Straight HTTP Post - > Data > can be HTTP (I guess I can use REST for this - but not all of them send > XML!) > * Some do via SOAP. > > This is for a premiums and thats how my client makes his money and I > would > like to give them a robust solution. > > I would like to use CXF Servlet (Or straight Spring Dispatcher > Servelt)and > also add Spring MVC controller so that I can add some actions for > non-soap > based communications - be it a XML - or any other data format. > > How can I combine these two! XFire had a solution where you use Straight > Spring Dispatcher Servlet and use a class called XFireExporter bean and > have > a url mapping on the MVC side! (XFireExporter implements a spring > controller). > > > The CXF migration says I do not need this as the *ServerFactoryBean > takes > care of this! I am little confused! Any idead where I can map the urls > in > the MVC to controllers including CXF Webservices as XFire did? > > Any help will be appreciated. > > Thanks > Matt > -- > View this message in context: > http://www.nabble.com/CXFServlet-%2B-WebServices-%2B-Spring-MVC-tf449826 > 8.html#a12828806 > Sent from the cxf-user mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/CXFServlet-%2B-WebServices-%2B-Spring-MVC-tf4498268.html#a12861059 Sent from the cxf-user mailing list archive at Nabble.com.
