title: Android return value in AsyncTask onPostExecute using Interface
body: <p>in this below code i want to return value from <code>AsyncTask</code> with using an Interface. but i get wrong value and i can not return correct value from <code>onPostExecute</code>.</p>
  
  <p>i'm developed this <a href="https://stackoverflow.com/questions/12575068/how-to-get-the-result-of-onpostexecute-to-main-activity-because-asynctask-is-a">link</a> tutorials with my code. i can not use correctly with that.</p>
  
  <p>Interface:</p>
  
  <pre><code>public interface AsyncResponse {
      void processFinish(String output);
  }
  </code></pre>
  
  <p><code>Ksoap</code> Main class:</p>
  
  <pre><code>public class WSDLHelper  implements AsyncResponse{
      public SoapObject request;
  
      private String Mainresult;
  
      public String call(SoapObject rq){
  
          ProcessTask p =new ProcessTask(rq);
          String tmp = String.valueOf(p.execute());
  
          p.delegate = this;
  
          return Mainresult;
      }
  
  
      @Override
      public void processFinish(String output) {
  
          this.Mainresult = output;
      }
  }
  class ProcessTask extends AsyncTask&lt;Void, Void, Void &gt; {
      public AsyncResponse delegate=null;
  
      SoapObject req1;
      private String result;
      public ProcessTask(SoapObject rq) {
          req1 = rq;
      }
  
      @Override
      protected void onPreExecute() {
          super.onPreExecute();
      }
  
      @Override
      protected Void doInBackground(Void... params) {
  
          SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
          envelope.setOutputSoapObject(this.req1);
  
          AndroidHttpTransport transport = new AndroidHttpTransport(Strings.URL_TSMS);
          transport.debug = true;
  
          try {
              transport.call(Strings.URL_TSMS + this.req1.getName(), envelope);
              this.result = envelope.getResponse().toString();
          } catch (IOException ex) {
              Log.e("" , ex.getMessage());
          } catch (XmlPullParserException ex) {
              Log.e("" , ex.getMessage());
          }
  
          if (result.equals(String.valueOf(Integers.CODE_USER_PASS_FALSE))) {
              try {
                  throw new TException(PublicErrorList.USERNAME_PASSWORD_ERROR);
              } catch (TException e) {
                  e.printStackTrace();
              }
  
          }
  
          Log.e("------------++++++++++++++++-----------", this.result);
  
          return null;
      }
  
      protected void onPostExecute(String result) {
      /* super.onPostExecute(result);*/
          delegate.processFinish(this.result);
      }
  
  }
  </code></pre>
  
  <p>please help me to resolve this problem</p>