sekhar sekhar - 9 months ago 66
Android Question SSL handshake aborted: ssl=0x52e57148:

When getting the response from the server I am getting an error like this: SSL handshake aborted: ssl=0x52e57148: Failure in SSL library, usually a protocol error

My code is:

private static String NAMESPACE = "";
private static String URL = "";
private static String SOAP_ACTION = "";

public static String invokeWS(String jsonObjSend, String webMethName) {
String resTxt = null;

// Create request
SoapObject request = new SoapObject(NAMESPACE, webMethName);
// Property which holds input parameters
PropertyInfo jsonObj = new PropertyInfo();
// Set Name
// Set Value
// Set dataType
// jsonObj.setType(JSONObject.class);
// Add the property to request object

// Create envelope
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
new MarshalBase64().register(envelope);
envelope.dotNet = true;
// Set output SOAP object
// Create HTTP call object
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

try {
// Invole web service, envelope);
// Get the response

SoapPrimitive response = (SoapPrimitive ) envelope.getResponse();
// Assign it to fahren static variable
resTxt = response.toString();

System.out.println("Response is: " + resTxt);

} catch (Exception e) {
resTxt = "Null";

return resTxt;

Answer Source

Just By making https to http it got resloved