I am using ksoap
lib to call the webservice
. In some cases service run correctly but in a case it gives Host name was not verified
below is my code f
Verify your host as
HttpsURLConnection.setDefaultHostnameVerifier(new HostVerifier());
public class HostVerifier implements HostnameVerifier {
@Override
public boolean verify(String hostname, SSLSession session) {
Log.i(TAG, "HOST NAME " + hostname);
if (hostname.contentEquals("XXX.XX.XXX.XXX")) {
Log.i(TAG, "Approving certificate for host " + hostname);
return true;
}
return false;
}
}