Soru & Cevap

Eclipse Android ile SOAP Hatası ...

07.05.2015 - 08:56

Merhaba Arkadaşlar
Eclipse Android ile SOAP servislerden işlem yaptırmak istiyorum.
resimdeki alanda hata alıyorum. Exception a düşen hata kodu da şu şekildedir.
Hata kodu:
Writes a printable representation of this Throwable stack trace to the System.err stream.
Site:http://www.mehmetkirazli.com/android-webservis-kullanimi/
Yardımlarınızı bekliyorum.
Kodlar:
[code]

private static final String SOAP_ACTION = "http://tempuri.org/CelsiusToFahrenheit";
private static final String METHOD_NAME = "CelsiusToFahrenheit";
private static final String NAMESPACE = "http://tempuri.org/";
private static final String URL ="http://www.w3schools.com/webservices/tempconvert.asmx";
EditText deger;
Button donustur;
TextView sonuc;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

deger = (EditText) findViewById(R.id.editText1);
donustur = (Button) findViewById(R.id.button1);
sonuc = (TextView) findViewById(R.id.textView1);

donustur.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v)
{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("Celsius", deger.getText().toString());

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);

HttpTransportSE AndroidHttpTransport = new HttpTransportSE(URL);
AndroidHttpTransport.debug = true;

try{
AndroidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();

sonuc.setText(response.toString());
}
catch (Exception e1){
e1.printStackTrace();
}
}
});

}

[/code]

Hata veren kısım

Görsel kaldırıldı.

 

2 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.

picture-30652-1547064135.png
bayramaliunuvar
09.05.2015 - 01:42

Androide yeni başladığım için yeterli bilgim yok detaylı bilgi verebilir misiniz? Birde aşağıdaki kod blogunda ki  http://tempuri.org/CelsiusToFahrenheit sitesi direkt bing e yönleniyor acaba site kapandı da veya url bozukda ondan mı cevap dönmüyor

[code]
private static final String SOAP_ACTION = "http://tempuri.org/CelsiusToFahrenheit"; private static final String METHOD_NAME = "CelsiusToFahrenheit"; private static final String NAMESPACE = "http://tempuri.org/"; private static final String URL ="http://www.w3schools.com/webservices/tempconvert.asmx";
[/code]

Profile picture for user gokhngungor
gokhngungor
09.05.2015 - 12:59

asynctask kullanın bendede öyle hata olmustu asynctas kullandım çalısıyor program