On Tuesday 15 January 2008, Pawel Janusz wrote:
> I sent my example, can You "translate" my conf into correct one with
> 1st option ?


The web.xml would just be:

<?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";>
        <display-name>SD</display-name>
            
  <servlet>
    <servlet-name>CXFServlet</servlet-name>
    <display-name>CXF Servlet</display-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>
    
        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>default.html</welcome-file>
                <welcome-file>default.htm</welcome-file>
                <welcome-file>default.jsp</welcome-file>
        </welcome-file-list>
</web-app>

And the WEB-INF/cxf-servlet.xml would be:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
      xmlns:jaxws="http://cxf.apache.org/jaxws";
      xsi:schemaLocation="
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
 
  <jaxws:endpoint id="SD_Users"
                  implementor="SD.services.Users"
                  address="/SD_Users"/>
                  
</beans>


Enjoy!
Dan


>
> Daniel Kulp pisze:
> > Pawel,
> >
> > When deploying in tomcat (or other war based thing), there are two
> > approaches to go to get it to work.   You kind of mixed the two
> > approaches so now it doesn't work.   :-)
> >
> > Approach one:
> > 1) Original CXF way of doing it:  define your beans in
> > WEB-INF/cxf-servlet.xml and do NOT put any other spring things in
> > your web.xml.   Your web.xml would need to have the context-param
> > and listener stuff removed.   What this does it create a cxf runtime
> > from the defaults and the servlet then adds the beans from
> > WEB-INF/cxf-servlet.xml to it.   (you would need to remove your
> > local transport stuff in cxf-servlet.xml as well)
> >
> >
> > 2) Using the Spring ContextLoaderListener:
> > In this case, you are responsible for for including all the cxf
> > stuff that you need.   The defaults won't be picked up.   Thus, you
> > need to add something like:
> >
> >         <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" />
> >
> > to the top of your spring context definition.   Ideally, you would
> > name the file something other than WEB-INF/cxf-servlet.xml as well
> > to avoid it getting processed twice, but that's just a performance
> > thing.
> >
> > Dan



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to