toughguyjasper / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

About Exception Cannot serialize #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
About CallForResponse cause the Execute - Exception Cannot serialize
in Android ICS
-----------------------------------------
01-27 13:44:48.284: E/WebService(32746): Execute - Exception Cannot serialize: 
[Lcom.ok.OTAUpdate.Services.DictionaryEntry;@41825230
01-27 13:44:48.285: W/System.err(32746): java.lang.RuntimeException: Cannot 
serialize: [Lcom.ok.OTAUpdate.Services.DictionaryEntry;@41825230
01-27 13:44:48.288: W/System.err(32746):    at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializatio
nEnvelope.java:629)
01-27 13:44:48.289: W/System.err(32746):    at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(SoapSerializati
onEnvelope.java:613)
01-27 13:44:48.291: W/System.err(32746):    at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(SoapSerializa
tionEnvelope.java:582)
01-27 13:44:48.292: W/System.err(32746):    at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(SoapSerializa
tionEnvelope.java:566)
01-27 13:44:48.293: W/System.err(32746):    at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(SoapSerializatio
nEnvelope.java:623)
01-27 13:44:48.295: W/System.err(32746):    at 
org.ksoap2.serialization.SoapSerializationEnvelope.writeBody(SoapSerializationEn
velope.java:547)
01-27 13:44:48.296: W/System.err(32746):    at 
org.ksoap2.SoapEnvelope.write(SoapEnvelope.java:192)
01-27 13:44:48.297: W/System.err(32746):    at 
org.ksoap2.transport.Transport.createRequestData(Transport.java:74)
01-27 13:44:48.299: W/System.err(32746):    at 
com.ok.OTAUpdate.WebService.SessionHttpTransport.CallForResponse(SessionHttpTran
sport.java:121)
01-27 13:44:48.300: W/System.err(32746):    at 
com.ok.OTAUpdate.WebService.WebService.Execute(WebService.java:162)
01-27 13:44:48.301: W/System.err(32746):    at 
com.ok.OTAUpdate.Services.ReportLogService.sendTestLog(ReportLogService.java:52)
01-27 13:44:48.303: W/System.err(32746):    at 
com.ok.OTAUpdate.test.WebServiceTestActivity$1.run(WebServiceTestActivity.java:5
1)

###################
About DictionaryEntry.java
package com.ok.OTAUpdate.Services;

import java.io.Serializable;

public class DictionaryEntry<T1, T2> implements Serializable{

    private T1 m_objKey;
    private T2 m_objValue;

    DictionaryEntry(){

    }

    public void SetKey(T1 objKey)
    {
        m_objKey = objKey;
    }

    public T1 GetKey()
    {
        return m_objKey;
    }

    public void SetValue(T2 objValue)
    {
        m_objValue = objValue;
    }

    public T2 GetValue()
    {
        return m_objValue;
    }
}

Original issue reported on code.google.com by JimmyChe...@gmail.com on 25 Oct 2012 at 10:21

GoogleCodeExporter commented 8 years ago
Generics might not work with ksoap2 android since it is at Java 1.3 language 
spec still.. 

Original comment by mosa...@gmail.com on 25 Oct 2012 at 4:02

GoogleCodeExporter commented 8 years ago

Original comment by mosa...@gmail.com on 5 Mar 2013 at 10:09