title: Getting jav ax.net.ssl.SSLHandshakeException when doing docusignapi handshade
body: <p>I am getting a <code>javax.net.ssl.SSLHandshakeException</code> when using the DocuSign API handshake.</p>
  
  <p>Trying to use the DocuSign API login samples gives a cert error.</p>
  
  <p>The following code is a sample from DocuSign. It sets up a Signer and DocuSign Configuration object.  When doing the <code>setDefaultApiClient</code> call, the error is generated.</p>
  
  <blockquote>
    <p>Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: jav
                ax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKI
                X path building failed: sun.security.provider.certpath.SunCertPathBuilderExcepti
                on: unable to find valid certification path to requested target
        at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle
        (URLConnectionClientHandler.java:155)
        at com.sun.jersey.api.client.Client.handle(Client.java:652)
        at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
        at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
        at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
        at com.docusign.esign.client.ApiClient.getAPIResponse(ApiClient.java:563)
        at com.docusign.esign.client.ApiClient.invokeAPI(ApiClient.java:595)
        at com.docusign.esign.api.AuthenticationApi.login(AuthenticationApi.java:156)</p>
  </blockquote>
  
  <p><strong>Added</strong></p>
  
  <pre><code>// initialize the api client ApiClient apiClient = new ApiClient();  
  apiClient.setBasePath(BaseUrl); // create JSON formatted auth header   
  String creds = "{\"Username\":\"" + UserName + 
     "\",\"Password\":\"" + Password + "\",\"IntegratorKey\":\"" +
     IntegratorKey + "\"}"; 
  apiClient.addDefaultHeader("X-DocuSign-Authentication", creds);
  System.out.println("assign api client to the Configuration object ");
  Configuration.setDefaultApiClient(apiClient); } 
  </code></pre>