why Exception is null in android
httpTransport.call this line of code have excetion, But ex is null
private static String CallServiceMethod(String methodName,String Json)
throws Exception {
Object response = null; try {
SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,methodName);
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.setName("Json");
propertyInfo.setValue(Json);
propertyInfo.setType(String.class);
request.addProperty(propertyInfo);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER12);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new
HttpTransportSE(SystemConfiguration.ServiceUrl);
httpTransport.call(WSDL_TARGET_NAMESPACE + methodName, envelope); //Error
response = envelope.getResponse();
}
catch (Exception ex)
{
//TODO:Log
String x = ex.getMessage(); //why ex is null???
}
return response.toString();
}
No comments:
Post a Comment