title: android : call java webservice exception -java.lang.RuntimeException
body: <p>HI am trying to call a webservice from android application.</p>
  
  <p>Am passing a serializable object <code>Person</code> from my android application to the calling webservice. and at the server side am taking this serializable object and doing some modifications there.</p>
  
  <p>But the problem is while at the time of executing my android app it is showing an exception like:  <code>java.lang.RuntimeException: Cannot serialize: com.test.android.Person@43950fe0</code></p>
  
  <p>Am not getting any idea about solving this. Both sides am using the serializable objects for setting and getting the parameters.</p>
  
  <p>Following is the Person Class am using </p>
  
  <pre><code>public class Person implements Serializable{
  
  private String firstName;
  private String lastame;
  
  public String getFirstName() {
      return firstName;
  }
  public void setFirstName(String firstName) {
      this.firstName = firstName;
  }
  public String getLastame() {
      return lastame;
  }
  public void setLastame(String lastame) {
      this.lastame = lastame;
  }
  
  }
  </code></pre>
  
  <p>my webservice imlpementation class in android side:</p>
  
  <pre><code>    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);        
      request.addProperty("person", person);
  
      SoapSerializationEnvelope envelope = 
          new SoapSerializationEnvelope(SoapEnvelope.VER11); 
  
      envelope.setOutputSoapObject(request);
      HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
  
      androidHttpTransport.call(SOAP_ACTION, envelope);
  
      SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
  </code></pre>
  
  <p>Am getting the error in this line <code>androidHttpTransport.call(SOAP_ACTION, envelope);</code> if am passing a serializable object as parameter , but if the param is a normal object like String,int etc am not facing any issue.</p>
  
  <p>Can anyone please give me an idea about how to solve this issue.?</p>