Pasar datos de ArrayList al servicio web SOAP en Android

Hola, necesito pasar los datos de la lista de arreglos al servicio web soap. Hasta ahora, tengo el siguiente código.

public class ResultActivity extends Activity { public final String NAMESPACE = ""; public final String URL = ""; public final String SOAP_ACTION_1 = ""; public final String METHOD_NAME_1 = ""; ProgressDialog mProgressDialog; SoapObject mSoapObjectCompanyDetailResponse; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.result); System.out.println("Size In resxusr " + OnLineApplication.mParserResults.size()); for (int i = 0; i < OnLineApplication.mParserResults.size(); i++) { System.out.println("ID " + OnLineApplication.mParserResults.get(i).getCompanyId()); System.out.println("Q " + OnLineApplication.mParserResults.get(i).getQuestion()); System.out.println("A " + OnLineApplication.mParserResults.get(i).getAnswer()); } new insertResult().execute(); } public class insertResult extends AsyncTask { @Override protected void onPreExecute() { // TODO Auto-generated method stub super.onPreExecute(); mProgressDialog = ProgressDialog.show(ResultActivity.this, "Wait", "Fetching"); } @Override protected Void doInBackground(Void... params) { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME_1); // request.addProperty("dt",""); for (int i = 0; i < OnLineApplication.mParserResults.size(); i++) { request.addProperty("CompanyID", 30); request.addProperty("Question", OnLineApplication.mParserResults.get(i).getQuestion()); request.addProperty("Answer", OnLineApplication.mParserResults.get(i).getAnswer()); } SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION_1, envelope); mSoapObjectCompanyDetailResponse = (SoapObject) envelope.bodyIn; Object re = null; re = envelope.getResponse(); Log.i("myApp", mSoapObjectCompanyDetailResponse.toString()); System.out.println("re " + mSoapObjectCompanyDetailResponse.toString()); // mStringCompanyID=re.toString(); } catch (Exception e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void result) { // TODO Auto-generated method stub super.onPostExecute(result); if (mProgressDialog != null) { mProgressDialog.dismiss(); } } } } 

Mi servicio XML WSDL es el siguiente.

                                

La siguiente estructura de datos es lo que necesito pasar al servicio web como se describió anteriormente.

 dt=anyType{DocumentElement=anyType{questions=anyType{CompanyID=1; Question=what is android?; Answer=OS; }; questions=anyType{CompanyID=1; Question=what is android?; Answer=OS; }; questions=anyType{CompanyID=1; Question=what is android?; Answer=OS; }; questions=anyType{CompanyID=1; Question=what is android?; Answer=OS; }; questions=anyType{CompanyID=1; Question=what is android?; Answer=OS; }; }; }; }; } 

Cuando ejecuto el código anterior, no puedo publicar los datos del Arraylist en el servidor. En mi método onCreate, puedo imprimir mis valores de Arraylist. ¿Como puedo resolver esto?

Prueba este código:

 SoapObject request = new SoapObject(Wsdl_Target_NameSpace, Method_Name); for (int i = 0; i < Property_Key.size(); i++) { request.addProperty(Property_Key.get(i), Property_Value.get(i)); } SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = null; androidHttpTransport = new HttpTransportSE(Url_location); androidHttpTransport.call(Soap_Action, envelope); SoapObject results = (SoapObject) envelope.bodyIn; Vector response = (Vector) envelope.getResponse();