android - SoapObject result of service call is always null -


i have implemented soap webservice following tutorial found on google developers website, , i'm writing android app call available service , show result (for in textview) using ksoap2 libraries. that's code:

public class downloaddatatask extends asynctask<void, void, soapobject> { private static string method_name = "getdata"; private static string soap_action = "http://example.com/getdata"; private static string wsdl_url = "http://arduino-data-server.appspot.com/functionsservice.wsdl"; private static string namespace = "http://example.com/"; private mainactivity caller_activity;  public downloaddatatask(mainactivity a) {     caller_activity = a; }  @override protected soapobject doinbackground(void... arg0) {     soapobject request = new soapobject(namespace, method_name);     soapserializationenvelope envelope = new soapserializationenvelope(             soapenvelope.ver12);     envelope.setoutputsoapobject(request);     httptransportse androidhttptransport = new httptransportse(wsdl_url);      try {         androidhttptransport.call(soap_action, envelope);         soapobject result = (soapobject) envelope.getresponse();         return result;     } catch (ioexception e) {         // todo auto-generated catch block         e.printstacktrace();     } catch (xmlpullparserexception e) {         // todo auto-generated catch block         e.printstacktrace();     }      return null; }  @override protected void onpostexecute(soapobject result) {     textview tw = (textview) caller_activity.findviewbyid(r.id.text_view);     if (result == null) {         tw.settext("null");     } else {         tw.settext(result.getname());     } } } 

but everytime, result soapobject it's null. what's wrong? on appengine server log, can see android app ask wsdl file, no request service sent. what's wrong (wsdl file available ad url write inside code)?

ksoap doesn't use wsdl (and doesn't request it). should pass service url instead of wsdl url. service url can find in wsdl (attribute location of address element in service description section).


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -