Code:
SoapObject request = new SoapObject(NAMESPACE, SOAP_METHOD_GETDATATBL);
request.addProperty(\"TName\", ttnm);
request.
The Problem was in internet Security.. due to set Firewall in internet or Proxy, i couldn't connect that webservice which was in server side.
Something similar happened to me, use
envelope = new SoapSerializationEnvelope (SoapEnvelope.VER12);
and it worked,
In my case that error arose because of a change in URL from http to https. Hence, you may want to ensure you are getting a response code 200 before processing the response.
Try below code..
HttpTransportSE transporter;
SoapSerializationEnvelope envelope;
SoapObject mSoapObject = null;
String METHOD_NAME = getString(R.string.soap_method_authentication);
try {
mSoapObject = new SoapObject(getString(R.string.soap_namespace),METHOD_NAME);
mSoapObject.addProperty("TName", "test");
mSoapObject.addProperty("ColumnNameStr", "*");
transporter = new HttpTransportSE(getString(R.string.soap_main_url));
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(mSoapObject);
transporter.call(getString(R.string.soap_namespace) + METHOD_NAME, envelope);
SoapObject response = (SoapObject) envelope.bodyIn;
System.out.println("Response : " + response);
} catch (Exception e) {
mTextView.setText("Error...");
e.printStackTrace();
}
String.xml
<string name="soap_main_url">your_main_url</string>
<string name="soap_namespace">http://tempuri.org/GetDataTbl/</string>
<string name="soap_method_authentication">GetDataTbl</string>