Could not handle mustUnderstand headers: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security. Returning fault

后端 未结 1 1311
遇见更好的自我
遇见更好的自我 2020-12-06 14:45

I went through links like: SOAPFaultException "MustUnderstand headers (oasis-200401-wss-wssecurity-secext-1.0.xsd) are not understood", but still struggling.

相关标签:
1条回答
  • 2020-12-06 15:35

    I was able to find the solution looking at https://docs.spring.io/spring-ws/site/apidocs/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.html and https://memorynotfound.com/spring-ws-username-password-authentication-wss4j/.

    I simply used below bean and its started working fine.

    @Bean
    public Wss4jSecurityInterceptor securityInterceptor() {
      Wss4jSecurityInterceptor security = new Wss4jSecurityInterceptor();
      security.setSecurementActions("NoSecurity");
      security.setSecurementPasswordType(WSConstants.PW_TEXT);
      return security;
    }
    
    0 讨论(0)
提交回复
热议问题