Configure jax-ws in Glassfish not to supply client certificate in SSL handshake

6 days ago 3
ARTICLE AD BOX

I have built a jax-ws web service client using the jaxws-maven-plugin. It is failing when I use it from a Glassfish 7.0.25 server with Java 21.

I'm calling a SAP server which only validates the client certificate in the SSL handshake if one is supplied by the client. If a client certificate is not supplied then SAP allows the connection.

SAP returns a CertificateRequest message during the SSL handshake, with a list of trusted certificate authorities.

Unfortunately, Glassfish sends its self-signed certificate, which isn't signed by one of these authorities and isn't trusted, and SAP abandons the handshake. I would like it not to supply a client certificate.

As part of the investigation into the problem, I wrote a web service client using jakarta.xml.soap.SOAPMessage and java.net.http.HttpClient. When I run it from the same Glassfish server, it returns 'No X.509 certificate for client authentication, use empty Certificate message instead', and the handshake is successful.

Does anyone know if it is possible to configure jax-ws to not to return a client certificate during the ssl handshake?

Read Entire Article