Using WebServiceTemplate with a keystore

后端 未结 6 605
无人共我
无人共我 2021-02-03 10:56

Is it possible to configure a WebServiceTemplate with a java keystore?

edit
I\'m looking for a way to configure the location of the keystore in the

6条回答
  •  温柔的废话
    2021-02-03 11:12

    I am posting this answer after six years but to be honest there isn't a single post where a complete and concise solution is provided. All you need is spring-ws-core (2.1.4.RELEASE +) and spring-we-security (2.2.4.RELEASE +) dependencies. The next step is to configure custom keystore and truststore as beans and then inject them to web service template in spring configuration.

    
    	
    	
    
    
    
    	
    	
    
    
    
        
            
                
    		
    			
    		
    	    
    	    
    		
    			
    			
    		
    	   
            
        
    

    In summery there is no need to write any code, the use case can be easily achieved using spring config.

提交回复
热议问题