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

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

    Hi!

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

    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Client</faultcode>
    <faultstring xml:lang="en">Validation error</faultstring>
    ...
    </SOAP-ENV:Fault>

    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="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor">
    <property name="schemas" value="/WEB-INF/*.xsd" />
    <property name="validateRequest" value="true" />
    <property name="validateResponse" value="true" />
    </bean>

    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?
Working...
X