cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pawel Janusz <pjan...@intertele.pl>
Subject Re: Use Tomcat
Date Tue, 15 Jan 2008 20:03:30 GMT
I sent my example, can You "translate" my conf into correct one with 1st 
option ?

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
>   

Mime
View raw message