Uploaded image for project: 'CXF Distributed OSGi'
  1. CXF Distributed OSGi
  2. DOSGI-266

Support for org.apache.cxf.jaxrs.ext.ContextProvider

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: provider-rs
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I would like to use CXF support for search http://cxf.apache.org/docs/jax-rs-search.html and for that I need to register a provider. In my tests the SearchContext is always null and I think it is caused by https://github.com/apache/cxf-dosgi/blob/master/provider-rs/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java

      where

      RsProvider.java
      ....
      
      private boolean isProvider(Object intent) {
              return (intent instanceof ExceptionMapper) // 
                  || (intent instanceof MessageBodyReader) //
                  || (intent instanceof MessageBodyWriter) //
                  || (intent instanceof ContextResolver);
          }
      
      ....
      
      

      only supports ContextResolver and not ContextProvider

      I'm going to try to make a workaround with a features but this is needed in order to make this work.

      Quoting CXF documentation:

      "Additionally, starting from CXF 2.6.0, SearchContextProvider needs to be registered as jaxrs:provider."

        Attachments

          Activity

            People

            • Assignee:
              cschneider Christian Schneider
              Reporter:
              ivoleitao Ivo Leitão
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: