title: java.lang.RuntimeException: Cannot serialize: MyClass
body: <p>I am trying to consume a web service through my android app by making a call to a function which expects a class object as an input parameter. But while making a call i'm getting an  error java.lang.RuntimeException: Cannot serialize: MyClass</p>
  
  <p>I have tried the following solutions but this did not help :
  <a href="https://stackoverflow.com/questions/11907434/ksoap2-java-lang-runtimeexception-cannot-serialize">KSOAP2 java.lang.RuntimeException: Cannot serialize</a></p>
  
  <p><a href="https://code.google.com/p/ksoap2-android/issues/detail?id=141" rel="nofollow noreferrer">https://code.google.com/p/ksoap2-android/issues/detail?id=141</a></p>
  
  <p>Code: 
                          SoapObject request = helperLogin();</p>
  
  <pre><code>        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                  SoapEnvelope.VER10);
  
          envelope.dotNet = false;
  
          envelope.setOutputSoapObject(request);
  
          envelope.addMapping(NAMESPACE, "L1UserProfileRowDTO", L1UserProfileRowDTO.class);
          envelope.addMapping(NAMESPACE, "L1UserRowDTO", L1UserRowDTO.class);
  
          HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
  
          androidHttpTransport.debug = true;
          TextView ACTV = (TextView) findViewById(R.id.textView1);
  
          androidHttpTransport.call(SOAP_ACTION, envelope);
  </code></pre>
  
  <p>the last line throws exception.</p>
  
  <p>My class implements serializable interface and also has a default constructor.
  Please help. </p>