Announcement Announcement Module
No announcement yet.
How to change (or remove) validation error's faultstring xml:lang-attribute? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change (or remove) validation error's faultstring xml:lang-attribute?


    I have a small problem with validation error faultstring-element. When validation error occurs, server returns following Soap-fault:

    <faultstring xml:lang="en">Validation error</faultstring>

    My problem is, that I would like to change xml:lang-attribute value to something else than en. Or better, remove it.

    On the server side I have following validator configuration:

    <bean id="validatingInterceptor" class=" .interceptor.PayloadValidatingInterceptor">
    <property name="schemas" value="/WEB-INF/*.xsd" />
    <property name="validateRequest" value="true" />
    <property name="validateResponse" value="true" />

    I have tried to make custom validator by extending PayloadValidatingInterceptor and overriding handleRequestValidationErrors-method, but I have a feeling that this is not the correct answer. Creating new locale-free Soap-fault based on fault in messageContext sounds pretty complex. Besides, copying detail-element (where error messages are) to new fault's detail is something I couldn't do I'm pretty sure that there's some locale setting that solves this but I can't find it.

    Any ideas?