0

i have a jks and i want to set the keystore and truststore while calling the soap based service. How can I do it without using System.setproperty?

  • You’ll need to create an SSLContext, initialize it with your keystore and truststore, get the context’s SSLSocketFactory, and set that socket factory in the port’s BindingProvider properties. See https://stackoverflow.com/questions/11001102/how-to-programmatically-set-the-sslcontext-of-a-jax-ws-client. – VGR Sep 06 '20 at 21:14
  • Do i need to add any external dependency in that case ? – user13635219 Sep 07 '20 at 18:29
  • I assume you’re using JAX-WS, so you already have JAX-WS as a dependency. Nothing else is needed. – VGR Sep 07 '20 at 22:10

0 Answers0