cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: Difference between cxf.xml and cxf-servlet.xml?
Date Wed, 21 Nov 2007 18:13:07 GMT
I see log messages indicating that CXF is looking for cxf.xml even when
I have my own beans. My guess is that unless you initialize the entire
system (starting from the bus) CXF will always look for cxf.xml, and, in
fact, there may be no conditions in which it fails to do that.

> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@verizon.net] 
> Sent: Wednesday, November 21, 2007 1:10 PM
> To: cxf-dev@incubator.apache.org
> Subject: Re: Difference between cxf.xml and cxf-servlet.xml?
> 
> OK, I'm still researching all of this (and others' related 
> emails) to update the documentation--but I have one question 
> left:  Does anyone know, that if I have *both* a Spring 
> configuration file (i.e., the "beans.xml"[1] file in the 
> java_first_spring_support sample below) declared in the 
> web.xml[2] and cxf.xml in the classpath, if *both* will be 
> loaded?  Or does the former prevent the latter from being 
> loaded and processed?  The CXF source code that covers this 
> is somewhat cryptic but I can research it more thoroughly if 
> necessary.
> 
> Thanks,
> Glen
> 
> [1] http://tinyurl.com/352htd
> [2] http://tinyurl.com/3djrlz
> 
> Am Freitag, den 16.11.2007, 10:53 +0800 schrieb Jeff Yu:
> > java_first_spring_support sample "beans.xml", it doesn't 
> need to have 
> > a cxf-servlet.xml  in the WEB-INF folder.
> 
> Excellent example.  Thanks for pointing it out.
> 
> > In fact, the cxf-servlet.xml just replace the http 
> transport ID to the 
> > servlet. ( in this case, the cxf-servlet.xml in the 
> > cxf-rt-transports-http module).
> > 
> 
> Good point.  I just noticed there are two different 
> cxf-servlet.xml's, the one above (in META-INF of the CXF JAR) 
> just does the above as you're saying.
> 
> 
> > The reason why the cxf-servlet.xml in the WEB-INF folder 
> would works, 
> > in this case, the cxf-servlet.xml contains the endpoint 
> configuration 
> > such as<jaxws:endpoint>.., because we define a 
> > "<servlet-name>cxf</servlet-name>" in the web.xml, by default, it 
> > would pick up the "cxf-servlet.xml" in the war..
> > 
> 
> Actually, that is exactly how Spring MVC's DispatcherServlet 
> works, xxxx-servlet.xml; but in our CXFServlet class it is 
> hardcoded to look for a "cxf-servlet.xml" no matter what the 
> servlet-name is.
> 
> 
> > so, to be specific, which case of cxf-servlet.xml do you 
> refer to? For 
> > the cxf-servlet.xml in the WEB-INF folder, it is optional. 
> You can do 
> > as same as java_first_spring_support sample did...
> > use another xml, and then ask spring's 
> ContextLoaderListener to load it..
> > 
> > Thanks
> > Jeff
> > 
> > Glen Mazza wrote:
> > > Do we have a sample anywhere of the syntax of 
> this--specifying the 
> > > Spring app context in the XML, and what such a config file would 
> > > look like?
> > >
> > > Thanks,
> > > Glen
> > >
> > > Am Donnerstag, den 15.11.2007, 11:12 -0500 schrieb Jiang, 
> Ning (Willem):
> > >   
> > >> If you specify the Spring application context in your 
> web.xml file.
> > >> You do not need to touch any of cxf.xml and cxf-servlet.xml.
> > >>
> > >> I admit that CXF provides lots of configuration here.
> > >>
> > >> Willem.
> > >>
> > >> -----Original Message-----
> > >> From: Randy Burgess [mailto:RBurgess@nuvox.com]
> > >> Sent: Thu 11/15/2007 21:52
> > >> To: cxf-user@incubator.apache.org
> > >> Subject: Re: Difference between cxf.xml and cxf-servlet.xml?
> > >>  
> > >> I don't even use either file and my services work without any 
> > >> issues. I use applicationContext*.xml files since I was using 
> > >> Spring before CXF and didn't see the point in creating either.
> > >>
> > >> Regards,
> > >> Randy Burgess
> > >> Web Applications Developer
> > >> Nuvox Communications
> > >>
> > >>
> 
> 
> 

Mime
View raw message