@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }
@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }
@Override protected void prepareConnection(HttpURLConnection connection) throws IOException { super.prepareConnection(connection); if (connection instanceof HttpsURLConnection) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; httpsConnection.setSSLSocketFactory(createSslSocketFactory()); if (hostnameVerifier != null) { httpsConnection.setHostnameVerifier(hostnameVerifier); } } }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { URL url = uri.toURL(); URLConnection connection = url.openConnection(); if (!(connection instanceof HttpURLConnection)) { throw new HttpTransportException("URI [" + uri + "] is not an HTTP URL"); } else { HttpURLConnection httpURLConnection = (HttpURLConnection) connection; prepareConnection(httpURLConnection); return new HttpUrlConnection(httpURLConnection); } }
public WebServiceConnection createConnection(URI uri) throws IOException { URL url = uri.toURL(); URLConnection connection = url.openConnection(); if (!(connection instanceof HttpURLConnection)) { throw new HttpTransportException("URI [" + uri + "] is not an HTTP URL"); } else { HttpURLConnection httpURLConnection = (HttpURLConnection) connection; prepareConnection(httpURLConnection); return new HttpUrlConnection(httpURLConnection); } }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { URL url = uri.toURL(); URLConnection connection = url.openConnection(); if (!(connection instanceof HttpURLConnection)) { throw new HttpTransportException("URI [" + uri + "] is not an HTTP URL"); } else { HttpURLConnection httpURLConnection = (HttpURLConnection) connection; prepareConnection(httpURLConnection); return new HttpUrlConnection(httpURLConnection); } }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { URL url = uri.toURL(); URLConnection connection = url.openConnection(); if (!(connection instanceof HttpURLConnection)) { throw new HttpTransportException("URI [" + uri + "] is not an HTTP URL"); } else { HttpURLConnection httpURLConnection = (HttpURLConnection) connection; prepareConnection(httpURLConnection); return new HttpUrlConnection(httpURLConnection); } }