package com.dbs.mplus.knuh.httpTask; import org.ksoap2.serialization.SoapObject; import java.util.HashMap; import java.util.concurrent.ExecutionException; public class HttpRunnable implements Runnable { private static final String TAG = "HttpRunnable"; private String soapAction = ""; private String callMethod = ""; private HashMap mData; private CallBack callBack; public HttpRunnable (String soapAction, String callMethod, HashMap mData, CallBack callBack) { this.soapAction = soapAction; this.callMethod = callMethod; this.mData = mData; this.callBack = callBack; } @Override public void run() { try { HttpSoapConnection httpSoapConnection = new HttpSoapConnection(soapAction, callMethod, mData); SoapObject result = httpSoapConnection.execute().get(); callBack.result(result); } catch (ExecutionException e) { } catch (InterruptedException e) { } } }