Problems with JAX-WS client and Microsoft.NET WCF web services with Custom Binding for Message Level
Need help to encrypt request SOAP message from a JAX-WS client to a Microsoft.NET WCF web services using Custom Binding.
We tried invoking the WCF web services with BasicHttpBinding and it works just fine.
We then tried to implement Message Level Security and the WCF web services implemented this using CustomBinding. It works fine for a C# client however, it a challenge with JAX-WS client.
Here is my Java client code:
final X509Certificate serverMLSCertificate = (X509Certificate) CertUtils.getCertificate(serverCert) ;
serverMLSCertificate.checkValidity() ;
List<CredentialProvider> credentialProviderList = new ArrayList<CredentialProvider>() ;
CredentialProvider credentialProvider = new ClientBSTCredentialProvider(
keyStore,
keyStorePass,
clientKeyAlias,
clientKeyPass,
"JKS",
serverMLSCertificate
) ;
credentialProviderList.add(credentialProvider) ;