Yes , here is another way which will not use the

org.springframework.web.context.ContextLoaderListener to start the endpoints.

You can find the example form CXF's hello world examples [1]
As Dan Kulp has said , you don't need "imports" any of
"classpath:META-INF/cxf-....."

[1] https://svn.apache.org/repos/asf/incubator/cxf/trunk/distribution/src/main/release/samples/wsdl_first/


Willem.
Daniel Kulp wrote:
The CXF servlet always looks for WEB-INF/cxf-servlet.xml and loads it. However, it does that after inializing the bus you any "imports" you have to "classpath:META-INF/cxf-....." should be removed as they would already be grabbed.

Dan


On Thursday 17 January 2008, yulinxp wrote:
All the sample use the following to start Spring and loads beans.xml
file. <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>WEB-INF/beans.xml</param-value>
        </context-param>

        <listener>
                <listener-class>
                        org.springframework.web.context.ContextLoaderListener
                </listener-class>
        </listener>

In my existing application, there is a customized springLoader in
place. Thus I can't use ContextLoaderListener anymore. Neither can I
plug in cxf into customized springLoader. Is there any otherway to
load beans.xml? I remember in XFire, we only define servlet-class and
servlet-mapping, then it will automatically look for
META-INF/xfire/services.xml. Can we do that in CXF? how?

<web-app>

  <servlet>
    <servlet-name>XFireServlet</servlet-name>
    <display-name>XFire Servlet</display-name>
    <servlet-class>
        org.codehaus.xfire.transport.http.XFireConfigurableServlet
    </servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>XFireServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>
</web-app>




Reply via email to