Spring WS-SOAP故障响应代码为500而不是400

Spring WS-SOAP故障响应代码为500而不是400,spring,soap,spring-ws,Spring,Soap,Spring Ws,目前我正在使用SpringWS(SpringWS核心:2.1.0.RELEASE) 我已设置全局方法安全性: <security:global-method-security pre-post-annotations="enabled" secured-annotations="enabled"/> 我有一个端点抛出AccessDeniedException,我使用SoapFaultMappingExceptionResolver处理它,如下所示: <bean id="e

目前我正在使用SpringWS(SpringWS核心:2.1.0.RELEASE) 我已设置全局方法安全性:

<security:global-method-security pre-post-annotations="enabled" secured-annotations="enabled"/>

我有一个端点抛出AccessDeniedException,我使用SoapFaultMappingExceptionResolver处理它,如下所示:

<bean id="exceptionResolver"
      class="org.springframework.ws.soap.server.endpoint.SoapFaultMappingExceptionResolver">
    <property name="defaultFault" value="SERVER"/>
    <property name="exceptionMappings">
        <value>
            org.springframework.security.access.AccessDeniedException=SENDER, 403 Forbidden
        </value>
    </property>
</bean>

org.springframework.security.access.AccessDeniedException=SENDER,403禁止
我得到以下回应

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  <env:Header/>
    <env:Body>
     <env:Fault>
       <env:Code>
        <env:Value>env:Sender</env:Value>
       </env:Code>
     <env:Reason>
        <env:Text xml:lang="en">403 Forbidden</env:Text>
    </env:Reason>
   </env:Fault>
 </env:Body>
</env:Envelope>

环境:发送者
403禁止
具有HTTP响应代码500

根据规格

它应该返回400


是我的错误还是Spring WS处理错误的方式?

您能解决这个问题吗?不,我没有。我也在吉特问过,但没有找到任何答案。