gateway-http append forward-slash(/) to jaxrs extensionMappings url.

Solution Verified - Updated -

Issue

  • cxf extension mapping don't work as expected if behind fabric http gateway.Fabric http gateway adds trailing "/" even on extension mappings.
  • GET /x/y/.pdf produces /x/y/.pdf/ --> is not found by extensionMappings
  • We have to double every extensionMapping so that it works with and without http gateway which is ugly.
  • blueprint.xml
<jaxrs:server id="restService" address="/CxfRsRouterTest/rest" >
    <jaxrs:serviceBeans>
      <ref component-id="customerService"/>
    </jaxrs:serviceBeans>
    <jaxrs:extensionMappings>
         <entry key="pdf/" value="application/pdf" /> <!-- Fabric http gateway adds trailing "/" even on extension mappings -->
         <entry key="pdf" value="application/pdf" />
    </jaxrs:extensionMappings>
</jaxrs:server>

Environment

  • Red Hat JBoss Fuse
    • 6.3.0

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.