Reputation: 21
I am trying to consume the soap service over https
, the client is authenticated by keystore
and is working in the soap ui
, by setting SSL Keysore
in the request properties. but failing with java WS client
below is the sample code to set the keymanagers
, I am not setting the truststore since I am not even using in the soap ui
as well.
@Bean
public HttpsUrlConnectionMessageSender messageSender() throws Exception {
HttpsUrlConnectionMessageSender messageSender = new HttpsUrlConnectionMessageSender();
messageSender.setKeyManagers(keyManagersFactoryBean().getObject());
messageSender.setHostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String arg0, SSLSession arg1) {
return true;
}
});
return messageSender;
}
Can some one help me on this, who faced similar issue
Upvotes: 1
Views: 1742
Reputation: 21
I have figured out the issue.
The web service exposed in the integration server were configured to authenticate the client with the certificate, the issued public key to the IS was having different serial number compared to the private key which I was holding, So that's the server could able to identify the client and giving invalid credentials.
Upvotes: 1