首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在验证错误中隐藏"Spring-WS“

在验证错误中隐藏"Spring-WS“
EN

Stack Overflow用户
提问于 2013-07-12 17:37:38
回答 1查看 688关注 0票数 4

当发出SOAP请求并且验证失败时,我得到的响应是:

代码语言:javascript
复制
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Client</faultcode>
         <faultstring xml:lang="en">Validation error</faultstring>
         <detail>
            <spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">xyz-pattern-valid: Value '.....' is not facet-valid with respect to pattern '[0-9x]+' for type 'ABC'.</spring-ws:ValidationError>
         </detail>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

有没有办法摆脱spring-ws,因为它明显暴露了底层的SOAP服务正在使用Spring和Java?

我已经考虑过扩展PayloadValidatingInterceptor,但是没有明显的方法可以去掉spring-ws标记。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-07-12 17:49:48

弄清楚了

代码语言:javascript
复制
public class ValidatingInterceptor extends PayloadValidatingInterceptor {
    @Override
    public QName getDetailElementName() {
        return new QName("http://www.mycee.co.za", "tech", "mt");
    }
}

哇哦!

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17611878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档