kullandığım kod tam olarak bu
if(spinner.getCount()==0){
Toast.makeText(getApplicationContext(), "Kayıt yok Kayıt Eklemelisiniz",Toast.LENGTH_SHORT ).show();
}else{
if(!checkInternetConnection(MainActivity.this))
{
onResume();
}else{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME1);
request.addProperty("WsUsername","11");
request.addProperty("WsPassword","1");
request.addProperty("CardNo",label.toString());
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
envelope.dotNet = true;
if (envelope.bodyIn instanceof SoapFault) {
String str= ((SoapFault) envelope.bodyIn).faultstring;
android.util.Log.i("", str);
} else {
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
android.util.Log.d("WS" , String.valueOf(resultsRequestSOAP));
}
try {
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION1, envelope);
SoapObject result = (SoapObject)envelope.bodyIn;
if(result != null)
{
PuanS=result.getProperty(0).toString();
AlertDialog alertDialog1 = new AlertDialog.Builder(MainActivity.this).create();
alertDialog1.setTitle("Puan Bilgisi...");
alertDialog1.setMessage(result.getProperty(0).toString());
alertDialog1.setButton("TAMAM", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
alertDialog1.setIcon(R.drawable.ic_launcher);
alertDialog1.show();
}
else
{
Toast.makeText(getApplicationContext(), "No Response",Toast.LENGTH_LONG).show();
}
} catch (Exception e) {
Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}}}
});