title: Cannot Serialize exception in SOAP Parsing in android
body: <p>I am trying to do SOAP parse, but getting an error. On catching exception in line <code>transport.call(SOAP_ACTION, envelope);</code>,  got Exception: <code>Cannot Serialize</code></p>
  
  <p>Code:</p>
  
  <pre><code>private double getFahrenheit(double celsius) throws IOException, XmlPullParserException {
  
      double farenheit = 0.0;
      SoapObject request =new SoapObject(NAMESPACE, METHOD_NAME);
  
      PropertyInfo info = new PropertyInfo(); 
      SoapPrimitive primitive;
  
      info.setName("Celsius");
      info.setValue(celsius);
      info.setType(double.class);
  
      request.addProperty(info);
  
      SoapSerializationEnvelope envelope =new    SoapSerializationEnvelope(SoapSerializationEnvelope.VER11);
      new MarshalBase64().register(envelope);
      envelope.dotNet = true;
      envelope.implicitTypes = true;
      envelope.setOutputSoapObject(request);
  
      HttpTransportSE transport = new HttpTransportSE(URL);
  
          transport.call(SOAP_ACTION, envelope);
          primitive = (SoapPrimitive) envelope.getResponse(); 
          farenheit = Double.parseDouble(primitive.toString());
          return farenheit;
  }
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>01-15 14:53:29.745: E/AndroidRuntime(2130): FATAL EXCEPTION: AsyncTask #1
  01-15 14:53:29.745: E/AndroidRuntime(2130): Process: com.example.demosoapparsing1, PID: 2130
  
  01-15 14:53:29.745: E/AndroidRuntime(2130): java.lang.RuntimeException: An error occured while executing doInBackground()
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at android.os.AsyncTask$3.done(AsyncTask.java:300)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.util.concurrent.FutureTask.run(FutureTask.java:242)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.lang.Thread.run(Thread.java:841)
  01-15 14:53:29.745: E/AndroidRuntime(2130): Caused by: java.lang.RuntimeException: Cannot serialize: 55.0
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializationEnvelope.java:629)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(SoapSerializationEnvelope.java:613)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(SoapSerializationEnvelope.java:582)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(SoapSerializationEnvelope.java:566)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializationEnvelope.java:623)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.serialization.SoapSerializationEnvelope.writeBody(SoapSerializationEnvelope.java:547)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.SoapEnvelope.write(SoapEnvelope.java:192)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.transport.Transport.createRequestData(Transport.java:74)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:58)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at com.example.demosoapparsing1.MainActivity.getFahrenheit(MainActivity.java:101)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at com.example.demosoapparsing1.MainActivity.access$1(MainActivity.java:77)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at com.example.demosoapparsing1.MainActivity$CalculateAsync.doInBackground(MainActivity.java:157)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at com.example.demosoapparsing1.MainActivity$CalculateAsync.doInBackground(MainActivity.java:1)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at android.os.AsyncTask$2.call(AsyncTask.java:288)
  01-15 14:53:29.745: E/AndroidRuntime(2130):     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  </code></pre>