Is it possible to configure CXF Interceptors at JBoss Level ?
Environment
- Red Hat JBoss Enterprise Application Plarform (EAP)
- 6.x
Issue
- Is it possible to configure on JBoss level some CXF interceptors ?
- Just like webservice handler chain can be configured in domain.xml or standalone.xml, is it possible to plug then some custom logic around OneWay interceptor ? We require to propagate UsernameToken and some custom metadata.
- We can't use wsdl or any "per webservice" solution. It has to be done on JBoss level. Not sure whether it has been foreseen in configuration or it should be done somehow programmatically.
Resolution
- CXF interceptors are basically proprietary to the stack itself.
- The handlers can be configured in the invocation channel for pre and post processing, but the CXF interceptors are always a feature that is specific to CXF and not JAXWS.
- They can be used as an alternative to JAXWS-Handlers if required. Also, the handlers are for both the chains, incoming and outgoing, whereas there are separate interceptors one needs to configure with for both sides.
-
Considering the above factors, configuring the CXF interceptors at the JBoss Level is not an option.
-
For this to be possible, you can modify stack-specific-deployment-aspects.xml file inside jbossws-cxf-resources-4.0.4.GA-redhat-1-jboss712.jar in module org.jboss.as.webservice.
- You can add there your own deploymentAspect which registers the interceptor in cxf right after OneWay interceptor. But, please note that this approach will NOT BE SUPPORTED.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments