こんにちは、aspx webservice から返された項目の配列を Android のスピナーに渡そうとしています。しかし、それは null を返します。私は何が間違っているのか知りたいです。以前に一連の文字列を返そうとしましたが、同じ接続で機能しました。助けていただければ幸いです。
私のアンドロイドコードは次のとおりです。
package com.example.fp1_webservicedropdown;
import android.R.string;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
import org.ksoap2.*;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.*;
public class MainActivity extends Activity {
    TextView result;
    Spinner spinnerC;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        spinnerC=(Spinner) findViewById(R.id.spinner1);
        result = (TextView) findViewById(R.id.textView2);
        final String NAMESPACE = "http://sample.com/";
        final String METHOD_NAME = "GetCustomerList";
        final String SOAP_ACTION = "http://sample.com/GetCustomerList";
        final String URL = "http://mylocalip/HelloWorldNew/Service1.asmx";
        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
        //Request.addProperty("a", "32");
        //Request.addProperty("b", "12");
        SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(
                SoapEnvelope.VER11);
        soapEnvelope.dotNet = true;
        soapEnvelope.setOutputSoapObject(Request);
        AndroidHttpTransport aht = new AndroidHttpTransport(URL);
        try {
            aht.call(SOAP_ACTION, soapEnvelope);
            SoapPrimitive resultString = (SoapPrimitive) soapEnvelope
                    .getResponse();
            result.setText("The web service returned "
                    + resultString.toString());
            //---------- result To Spinner Code -----------------------//
            String[] toSpinner = new String[]{resultString.toString()};
            ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_spinner_item,  toSpinner );
                adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                spinnerC.setAdapter(adapter);
              //---------- result To Spinner Code ends here -----------------------//       
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
私のWebサービスコードは次のとおりです。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Collections;
namespace HelloWorldNew
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
     [WebService(Namespace = "http://sample.com/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {
        [WebMethod]
        public ArrayList GetCustomerList()
        {
            ArrayList list = new ArrayList();
            list.Add("Shean");
            list.Add("Yo");
            return list;
        }
    }
 }