Unable to use system properties in cxf.xml

Solution Verified - Updated -

Issue

We use the following in a cxf.xml file at the server level in order control some CXF behavior. For example:

<cxf:properties>
  <beans:entry key="set-jaxb-validation-event-handler" value="false" />
  <beans:entry key="faultStackTraceEnabled" value="true"/>
</cxf:properties>

We modified it in order to be able to control the behaviour using system properties like this:

<cxf:properties>
  <beans:entry key="set-jaxb-validation-event-handler" value="${cxf.set.jaxb.validation.event.handler:false}" />
  <beans:entry key="faultStackTraceEnabled" value="${cxf.faultStackTraceEnabled:true}"/>
</cxf:properties>

For instance, we want the value true to be set as a default value for the key faultStackTraceEnabled, but we want to be able to override the default value.

But when I use this syntax ${cxf.faultStackTraceEnabled:true}, the stack trace stopped being sent to the client side (i.e. the property wasn't being resolved correctly).

What is wrong with how I'm using ${cxf.faultStackTraceEnabled:true}?

Environment

  • Red Hat JBoss Enterprise Application Platform 5

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.