To enable transport layer security, you must enable the
HTTPS protocol on your server. See the application server documentation
for more information.
About this task
Ensure your web services client code uses the HTTPS port
by enabling either one- or two-way SSL.
Tip: You
may need to alter the configuration of your application server to
ensure the HTTPS port is used for your web services. Consider disabling
access to the HTTP port for the web service.
Procedure
- For one-way SSL configuration, export the certificate that
the server sends to verify its identity. Import this certificate into
a truststore that the client will use. In your client code, set the
following system properties before attempting any communication:
- javax.net.ssl.trustStore
- javax.net.ssl.trustStorePassword
- For two-way security, configure the keystore and set the
keystore variables:
- javax.net.ssl.keyStore
- javax.net.ssl.keyStorePassword
Note: If you are executing the generated
client, either modify the code as described here to set the system
properties, or use -D properties when launching the client.