title: Specify SSLContext for SOAP Client Using Apache CXF
body: <p>So we have a SOAP client that's been working and the customer recently switched the server over to use SSL with a self-signed certificate. Now I'm trying to figure out how to get our client the correct SSL context to use. I found a related question <a href="https://stackoverflow.com/questions/11001102/how-to-programmatically-set-the-sslcontext-of-a-jax-ws-client">here</a>; but I don't see how to tie it into my code (relevant portions summarized below - DCAMethods[Soap] is a cxf generated interface).</p>
  
  <pre><code>File tmp = cacheWsdl(UUID.randomUUID().toString(), new URL(wsdlLocation), anzoSSLContext);
  // It would be useful to specify the SSLContext here, but I am working around that.
  DCAMethods methods = new DCAMethods(tmp.toURI().toURL()); 
  DCAMethodsSoap soapInterface = methods.getDCAMethodsSoap();
  // Need to specify the SSLContext for this call.
  String rawXmlData = (String) soapInterface.getCopy(connectionId, username, password, documentVersionId, rendition); 
  </code></pre>