How to modify XML error messages with CXF?
Issue
- We have a JAX-WS CXF service which receives the request with security header. If authentication fails, the service sends back a generic message "org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized..." which is also included in the SOAP response body. Instead of the generic message, we would like to generate a customized meaningful message so user understands the exception well. How can we do this?
Environment
- JBoss Enterprise Application Platform (EAP) 6.x
- JBoss Enterprise Application Platform (EAP) 5.x
- CXF
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
