Chapter 3. Server Side Integration Customization
JBossWS-CXF allows users to deploy their webservice endpoints by simply providing their archives the same way they used to do with JBossWS-Native. However, it is possible to customize the JBossWS and CXF integration by incorporating a CXF configuration file to the endpoint deployment archive. The convention is the following:
- The file name must be
jbossws-cxf.xml
- For POJO deployments it is located in
WEB-INF
directory - For EJB3 deployments it is located in
META-INF
directory
If the user does not provide their own CXF configuration file, the default one will be automatically generated during the runtime. For POJO deployments the generated
jbossws-cxf.xml
has the following content:
<beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans' xmlns:jaxws='http://cxf.apache.org/jaxws' xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'> <!-- one or more jaxws:endpoint POJO declarations --> <jaxws:endpoint id='POJOEndpoint' address='http://localhost:8080/pojo_endpoint_archive_name' implementor='my.package.POJOEndpointImpl'> <jaxws:invoker> <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/> </jaxws:invoker> </jaxws:endpoint> </beans>
For EJB3 deployments the generated
jbossws-cxf.xml
has the following content:
<beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans' xmlns:jaxws='http://cxf.apache.org/jaxws' xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'> <!-- one or more jaxws:endpoint EJB3 declarations --> <jaxws:endpoint id='EJB3Endpoint' address='http://localhost:8080/ejb3_endpoint_archive_name' implementor='my.package.EJB3EndpointImpl'> <jaxws:invoker> <bean class='org.jboss.wsf.stack.cxf.InvokerEJB3'/> </jaxws:invoker> </jaxws:endpoint> </beans>
Providing custom CXF configuration to the endpoint deployment is useful in cases when users want to use features that are not part of standard JAX-WS specification but CXF still implements them. See Chapter 8, WS-Reliable Messaging Tutorial for more information. We provide custom CXF endpoint configuration there to turn on WS-RM feature for the endpoint.
Note
When the user incorporates their own CXF configuration to the endpoint archive they must reference either
org.jboss.wsf.stack.cxf.InvokerJSE
or the org.jboss.wsf.stack.cxf.InvokerEJB3 JAX-WS
invoker bean there for each JAX-WS endpoint.