title: java SSLHandshakeException No subject alternative names matching IP address
body: <p>As a restful client, I can successfully connect to the server using the <strong>Postman</strong> software without any certification or security setting. (I receive the correct response from the server)
  But when I call it using java Program, it throws Exception below:</p>
  <p><strong>javax.net.ssl.SSLHandshakeException: No subject alternative names matching IP address 192.168.12.125 found</strong></p>
  <p>I also looked at this <a href="https://stackoverflow.com/questions/29157861/java-certificateexception-no-subject-alternative-names-matching-ip-address">link</a> that didn't solve my problem.</p>
  <p>here is java code I used:</p>
  <pre><code>import com.sun.jersey.api.client.Client;
  import com.sun.jersey.api.client.ClientResponse;
  import com.sun.jersey.api.client.WebResource;
  import java.io.Serializable;
  
  public class CallService implements Serializable {
      private String uri = &quot;https://192.168.12.125:443/ssdpn&quot;;    
      private Client client;
      private WebResource webResource;
  
      public void sendRequest(String input) {
          try {
              client = Client.create();
              webResource = client.resource(uri);
  
              String requestBody = prepareJSONFormatRequest(input);
              ClientResponse response =
                      webResource.path(&quot;/Service205&quot;)
                              .header(&quot;trackId&quot;, &quot;1001&quot;)
                              .header(&quot;serviceId&quot;, &quot;Service205&quot;)
                              .post(ClientResponse.class, requestBody);
  
              String result = response.getEntity(String.class);
  
          } catch (Exception ex) {
              System.out.println(ex.getMessage());
          }
      }
      
      private String prepareJSONFormatRequest(String input) {
          StringBuilder request = new StringBuilder();
          request.append(&quot;{ &quot;).append(&quot;\&quot;SerialNumber\&quot;:\&quot;&quot;).append(input).append(&quot;\&quot; }&quot;);
          return request.toString();
      }
  
  }
  </code></pre>
  <p>in the java program, I also use no certificate (As I do in Postman call).
  could anybody help me to find where does the problem lies?</p>