Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Questo contenuto non è disponibile nella lingua selezionata.
3.3. Bootstrapping a CXF Servlet in a WAR
Overview Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
A simple way to bootstrap Apache CXF in a WAR is to configure
web.xml to use the standard CXF servlet, org.apache.cxf.transport.servlet.CXFServlet.
Example Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
For example, the following
web.xml file shows how to configure the CXF servlet, where all Web service addresses accessed through this servlet would be prefixed by /services/ (as specified by the value of servlet-mapping/url-pattern):
cxf-servlet.xml file Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
In addition to configuring the
web.xml file, it is also necessary to configure your Web services by defining a cxf-servlet.xml file, which must be copied into the root of the generated WAR.
Alternatively, if you do not want to put
cxf-servlet.xml in the default location, you can customize its name and location, by setting the contextConfigLocation context parameter in the web.xml file. For example, to specify that Apache CXF configuration is located in WEB-INF/cxf-servlet.xml, set the following context parameter in web.xml: