如何根据WSDL验证肥皂请求

时间:2020-04-02 07:07:35

标签: java spring spring-boot web-services soap

我正在尝试使用以下代码根据wsdl创建验证:

    @Override
    public void addInterceptors(List<EndpointInterceptor> interceptors) {

    PayloadValidatingInterceptor validatingInterceptor = new PayloadValidatingInterceptor();
    validatingInterceptor.setValidateRequest(true);
    validatingInterceptor.setValidateResponse(true);
    validatingInterceptor.setSchema(new ClassPathResource("test.xsd"));
    interceptors.add(validatingInterceptor);

}

但是我遇到以下错误:

  The method add(EndpointInterceptor) in the type List<EndpointInterceptor> is not applicable for the arguments (PayloadValidatingInterceptor)

0 个答案:

没有答案