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



On Tuesday 15 January 2008, Pawel Janusz wrote:
> I'm sending files
>
> Willem Jiang pisze:
> > Hi Pawel
> >
> > Did you use CXFServlet transport which delegate the http transport
> > to a CXFServlet ?
> > If so , could you show me your Web.xml  and Beans.xml?
> >
> > In you case I think you still start a new Jetty engine for listening
> > the port.
> >
> > Willem.
> >
> > Pawel Janusz wrote:
> >> Hello
> >> How to setup CXF not to use Jetty when defining "adress" in
> >> "jaxws:endpoint". When I try to pass such:
> >> address="/service" i got error. Only when I give full address port
> >> (port has to be different from Tomcat's).
> >>
> >> eg. (this one works fine)
> >>
> >> <jaxws:endpoint id="MyServiceService"
> >>  implementor="#MyServiceServiceImpl"
> >>        address="http://localhost:8081/MyService
> >> "/>
> >>
> >>
> >> I want to use this one but not working :(
> >>
> >> <jaxws:endpoint id="MyServiceService"
> >>  implementor="#MyServiceServiceImpl"
> >>        address="/MyService"/>



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

Reply via email to