I would say yes, as you're doing the second configuration option (manual
declaration and loading of CXF modules) as explained here:
http://www.jroller.com/gmazza/date/20080417#WFstep7 and done here:
http://www.jroller.com/gmazza/date/20080417#WFstep8

If needed, you can load multiple config files, BTW, as shown here:
http://www.jroller.com/gmazza/date/20061128

HTH,
Glen


2008-05-14 Abid Hussain wrote:
> Hi Daniel,
> 
> I don't use a cxf-servlet.xml file. Does that mean, I need to declare a 
> ContextLoaderListener in web.xml (my web.xml and cxf.xml below)?
> 
> For which purpose is the ContextLoaderListener needed?
> 
> Regards,
> 
> Abid
> 
> My web.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.4"
>       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";>
>       <context-param>
>               <param-name>contextConfigLocation</param-name>
>               <param-value>WEB-INF/classes/cxf.xml</param-value>
>       </context-param>
> 
>       <display-name>Modulverwaltung</display-name>
>       <servlet>
>               <display-name>Controller</display-name>
>               <servlet-name>controller</servlet-name>
>               <servlet-class>
>                       modulverwaltung.controller.Controller
>               </servlet-class>
>               <init-param>
>                       <param-name>log4j-init</param-name>
>                       
> <param-value>WEB-INF/classes/log4j.properties</param-value>
>               </init-param>
>               <load-on-startup>1</load-on-startup>
>       </servlet>
>       <servlet>
>               <display-name>CXF Servlet</display-name>
>               <servlet-name>CXFServlet</servlet-name>
>               <servlet-class>
>                       org.apache.cxf.transport.servlet.CXFServlet
>               </servlet-class>
>       </servlet>
>       
>       <servlet-mapping>
>               <servlet-name>CXFServlet</servlet-name>
>               <url-pattern>/services/*</url-pattern>
>       </servlet-mapping>
>       <servlet-mapping>
>               <servlet-name>controller</servlet-name>
>               <url-pattern>/controller</url-pattern>
>       </servlet-mapping>
> 
>       <session-config>
>               <session-timeout>30</session-timeout>
>       </session-config>
> 
>       <jsp-config>
>               <!-- ... -->
>       </jsp-config>
> </web-app>
> 
> My cxf.xml:
> <beans xmlns="http://www.springframework.org/schema/beans";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xmlns:jaxws="http://cxf.apache.org/jaxws";
>       xmlns:sec="http://cxf.apache.org/configuration/security";
>       xmlns:http="http://cxf.apache.org/transports/http/configuration";
>       xsi:schemaLocation="http://cxf.apache.org/configuration/security 
> http://cxf.apache.org/schemas/configuration/security.xsd
>            http://cxf.apache.org/transports/http/configuration 
> http://cxf.apache.org/schemas/configuration/http-conf.xsd
>            http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>            http://cxf.apache.org/jaxws 
> http://cxf.apache.org/schemas/jaxws.xsd";>
> 
>       <import resource="classpath:META-INF/cxf/cxf.xml" />
>       <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>       <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> 
>       <http:conduit
>               
> name="{http://ws.kvv.mi.fuberlin.de/}KvvServiceImplService.http-conduit";>
>               <http:tlsClientParameters secureSocketProtocol="SSL" />
>       </http:conduit>
>       <jaxws:endpoint id="moduleServiceImpl"
>               implementor="modulverwaltung.service.ModuleServiceImpl"
>               address="/ModuleService" />
> </beans>
> 
> 
> Daniel Kulp schrieb:
> > 
> > If you are using a cxf-servlet.xml type thing to define your endpoint 
> > beans, then no, you don't need it.
> > 
> > Dan
> > 
> > 
> > On May 13, 2008, at 5:37 AM, Abid Hussain wrote:
> > 
> >> Hi everybody,
> >>
> >> I'm using tomcat 5.5.x. In my web.xml I put the following lines, just 
> >> because it was said so in the cxf-documentation:
> >> <listener>
> >>     <listener-class>
> >>         org.springframework.web.context.ContextLoaderListener
> >>     </listener-class>
> >> </listener>
> >>
> >> As far as I understood, the ContextLoaderListener is used when the 
> >> context of the webapp is reloaded, which only happens if the content 
> >> of WEB-INF/classes (resp. WEB-INF/lib) changes.
> >>
> >> The only way of deployment I use is by war-files. So am I right, that 
> >> the registration of the ContextLoaderListener in web.xml is not needed 
> >> in this case?
> >>
> >> Regards,
> >>
> >> Abid
> >>
> >> -- 
> >>
> >> Abid Hussain
> >> Mail: [EMAIL PROTECTED]
> >> Web: http://www.abid76.de
> > 
> > ---
> > Daniel Kulp
> > [EMAIL PROTECTED]
> > http://www.dankulp.com/blog
> > 
> > 
> > 
> > 
> > 
> 

Reply via email to