KSOAP2 java.lang.RuntimeException: Impossible de sérialiser

Je suis en train d'utiliser une méthode à partir d'un .net web service.

Le code-behind pour le service web a un " /" à la fin de l'espace de noms

[WebService(Namespace = "http://www.mynamespace.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

Ici est la .net appel de la méthode

POST /TelematicsWebService/Service.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.mynamespace.com/GetDevicesByBranch"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetDevicesByBranch xmlns="http://www.mynamespace.com/">
      <branchNumber>int</branchNumber>
    </GetDevicesByBranch>
  </soap:Body>
</soap:Envelope>

Maintenant le code de l'appel de la méthode ressemble à ce

    @Override
    protected SoapObject doInBackground(Integer... branchNumber) {

        final String NAMESPACE = "http://www.mynamespace.com/";
        final String METHOD_NAME = "GetDevicesByBranch";
        final String SOAP_ACTION = NAMESPACE + METHOD_NAME;
        final String URL = "http://10.0.2.2/TelematicsWebService/Service.asmx";

        SoapObject response = null;

        try {
            SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

            PropertyInfo inputArgs = new PropertyInfo();
            inputArgs.setName("branchNumber");
            inputArgs.setValue(branchNumber);
            inputArgs.setType(Integer.class);
            request.addProperty(inputArgs);

            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                    SoapEnvelope.VER11);
            envelope.dotNet = true;
            envelope.setOutputSoapObject(request);

            HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,
                    25000);
            androidHttpTransport.call(SOAP_ACTION, envelope);
            response = (SoapObject) envelope.getResponse();
        } catch (Exception exception) {
            response = null;
        }

        return response;
    }

De la ligne vers la fin, androidHttpTransport.call(SOAP_ACTION, envelope);, déclenche une exception: java.lang.RuntimeException: Cannot serialize: [Ljava.lang.Integer;@412e0cf0

Je ne peux pas trouver une solution à ce problème, des suggestions?

OriginalL'auteur Theo | 2012-08-10