Я пытаюсь отправить список по KSoap2
, но я получаю ошибку Невозможно сериализовать , как я могу десериализовать список, который я хочу отправить
private SoapObject GuardarListadoLecturasAsignadows(long idEmpresa, List<OrdenLecturaInfoBulk> readingList, String userName, String url)
throws IOException, XmlPullParserException {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME_GUARDAR_LISTADO_LECTURAS);
String uniqueID = UUID.randomUUID().toString();
request.addProperty("idEmpresa", idEmpresa);
request.addProperty("readingList", readingList);
request.addProperty("progressFeedbackKey", uniqueID);
request.addProperty("usuario", userName);
// Envelope
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
String urlCom = url + LECTURAS_RUTAS_SERVICE + "?wsdl";
// Transport
HttpTransportSE transporte = new HttpTransportSE(urlCom, TIMEOUT);
transporte.call(SOAP_ACTION_GUARDAR_LISTADO_LECTURAS, envelope);
return (SoapObject) envelope.getResponse();
}
Ошибка:
E/BaseCustomLoaderTask: java.lang.RuntimeException: Cannot serialize: [co.com.solin.mobile.model.OrdenLecturaInfoBulk@19455d1, co.com.solin.mobile.model.OrdenLecturaInfoBulk@ef46836, co.com.solin.mobile.model.OrdenLecturaInfoBulk@5950337, co.com.solin.mobile.model.OrdenLecturaInfoBulk@af750a4, co.com.solin.mobile.model.OrdenLecturaInfoBulk@8b77e0d, co.com.solin.mobile.model.OrdenLecturaInfoBulk@996d1c2, co.com.solin.mobile.model.OrdenLecturaInfoBulk@72c9bd3, co.com.solin.mobile.model.OrdenLecturaInfoBulk@daad310, co.com.solin.mobile.model.OrdenLecturaInfoBulk@c6aee09] W/System.err: java.lang.RuntimeException: Cannot serialize: [co.com.solin.mobile.model.OrdenLecturaInfoBulk@19455d1, co.com.solin.mobile.model.OrdenLecturaInfoBulk@ef46836, co.com.solin.mobile.model.OrdenLecturaInfoBulk@5950337, co.com.solin.mobile.model.OrdenLecturaInfoBulk@af750a4, co.com.solin.mobile.model.OrdenLecturaInfoBulk@8b77e0d, co.com.solin.mobile.model.OrdenLecturaInfoBulk@996d1c2, co.com.solin.mobile.model.OrdenLecturaInfoBulk@72c9bd3, co.com.solin.mobile.model.OrdenLecturaInfoBulk@daad310, co.com.solin.mobile.model.OrdenLecturaInfoBulk@c6aee09] W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializationEnvelope.java:763) W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(SoapSerializationEnvelope.java:743) W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(SoapSerializationEnvelope.java:683)
at org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBodyWithAttributes(SoapSerializationEnvelope.java:659) W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializationEnvelope.java:756) W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.writeBody(SoapSerializationEnvelope.java:629) W/System.err: at org.ksoap2.SoapEnvelope.write(SoapEnvelope.java:205) W/System.err: at org.ksoap2.transport.Transport.createRequestData(Transport.java:153)
at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:149) W/System.err: at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118) W/System.err: at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:113) W/System.err: at co.com.solin.mobile.ws.SoapClient.GuardarListadoLecturasAsignadows(SoapClient.java:464) W/System.err: at co.com.solin.mobile.ws.SoapClient.GuardarListadoLecturasAsignado(SoapClient.java:432)
at co.com.solin.mobile.model.SolinMobile.GuardarListadoLecturasAsignado(SolinMobile.java:764) W/System.err: at co.com.solin.mobile.ReadingsActivity$UpReadingTask.doInBackgroundCustom(ReadingsActivity.java:566) W/System.err: at co.com.solin.mobile.ReadingsActivity$UpReadingTask.doInBackgroundCustom(ReadingsActivity.java:558)
at co.com.solin.mobile.utils.BaseCustomLoaderTask.doInBackground(BaseCustomLoaderTask.java:71) W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:333) W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266) W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764) D/EGL_emulation: eglMakeCurrent: 0xe285e4a0: ver 3 0 (tinfo 0xcfa6f080) D/EGL_emulation: eglMakeCurrent: 0xe285e4a0: ver 3 0 (tinfo 0xcfa6f080) D/EGL_emulation: eglMakeCurrent: 0xe285e4a0: ver 3 0 (tinfo 0xcfa6f080) D/EGL_emulation: eglMakeCurrent: 0xe285e4a0: ver 3 0 (tinfo 0xcfa6f080)