Search code examples
apachecxftruncate

Apache CXf - truncating .xml/.json from @path param


How to avoid truncating .xml from @Path param ..?? example: http://localhost:8090/testproject/relatedpath/abcxyz123456.xml

In service, we are receiving "abcxyz123456" instead of "abcxyz123456.xml"


Solution

  • Try to remove this from your <jaxrs:server> configuration to disable debugging options in CXF. See http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Debugging

    <jaxrs:extensionMappings>
       <entry key="xml" value="application/xml"/>
    </jaxrs:extensionMappings>