bridge jax rs feature to cxf

Solution In Progress - Updated -

Issue

We created a simple application with cxf feature with interceptor and it works fine. However, when we create pure jax rs feature we are getting the below exception, saying CXF engine only accepts the CXF feature.

Exception: caused by: java.lang.IllegalStateException: Cannot convert value of type [xxx.xxx.xxx.MyJaxRsFeature] to required type [org.apache.cxf.feature.Feature] for property 'features[1]': no matching editors or conversion strategy found
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:267)

According to the cxf 3.0.0 API, there is one class ConfiguratonImpl which can be used to inject the jax rs feature to CXF enabled service, we need to get some example on how we can have the jax rs feature bridge with CXF on fuse environment.

public class ConfigurationImpl
extends Object
implements javax.ws.rs.core.Configuration

setFeature
public void setFeature(javax.ws.rs.core.Feature f,
                       boolean enabled)

we have home grown authentication feature which is jax rs Feature works fine with traditional jax rs web application, however we need to incorporate that to Fuse, it seem CXF engine inside the fuse does not support the jax rs feature, however from cxf 3.0.0 version onwards there seems to be support exist, which I specified on the problem section.

Environment

  • Red Hat JBoss Fuse
    • 6.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.