title: Getting java.lang.RuntimeException: Cannotserialize while passing array list of byte to web service using ksoap2 in android
body: <p>I have db file of about 5 mb in size ,  I have converted to byte array list and want to pass it to my web service for saving on server but I am getting can not serialize error. I am attaching my code below...</p>
  
  <pre><code>            SoapObject soap_request = new SoapObject(NAMESPACE, METHOD_NAME1);
              fileName = "DB"+UserID+"_"+backupDateTime+".db";
  
              PropertyInfo pi1 = new PropertyInfo();
              pi1.setName("_FileName");
              pi1.setType(String.class);
              pi1.setValue(fileName);
              soap_request.addProperty(pi1);
  
              PropertyInfo pi2 = new PropertyInfo();
              pi2.setName("_ByteArray");
              pi2.setType(ArrayList.class);
              pi2.setValue(data);
              soap_request.addProperty(pi2);
  
              PropertyInfo pi3 = new PropertyInfo();
              pi3.setName("UserID");
              pi3.setType(Integer.class);
              pi3.setValue(UserID);
              soap_request.addProperty(pi3);
  
              Log.v(TAG, "soap_request _FileName= &gt;&gt;"+soap_request.getProperty(0));
              Log.v(TAG, "soap_request _ByteArray= &gt;&gt;"+soap_request.getProperty(1));
              Log.v(TAG, "soap_request UserID= &gt;&gt;"+soap_request.getProperty(2));
  
              SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
              //new MarshalBase64().register(envelope);
              envelope.setOutputSoapObject(soap_request);
              envelope.dotNet = true;
  
              Log.v(TAG,"Calling webservice....");
              androidHttpTransportSE = new HttpTransportSE(URL);
              androidHttpTransportSE.debug = true;
              androidHttpTransportSE.call(SOAP_ACTION1, envelope);
  
              Log.v(TAG,"Getting result from webservice....");
              SoapObject result = (SoapObject) envelope.bodyIn;
              JSONObject response = new JSONObject(result.getProperty(0).toString());
              Log.v(TAG, "Web Response...." + response.get(" Result "));
  
              if (response.get(" Result ").equals("Uploading DataBase Backup To Server successfully"))
              {
                  flag = true;
                  Log.v(TAG, "Database is uploaded .........");
              }
  </code></pre>