您好我正在尝试在服务上发送请求(以及数据),我得到了:
java.lang.RuntimeException:无法序列化:28.6297543
通过观察异常我已经明白这与我的对象中定义的Double类型属性有关,但坦率地说我不知道如何纠正这个,这是我的代码库,
public String sendDataToServer(String IMEI, String mobileNo,double latitude, double longitude, String currentDateTime) {
SoapObject request = new SoapObject(NAMESPACE,WEBMETHOD);
request.addProperty("IMEI",IMEI);
request.addProperty("Mobile",mobileNo);
request.addProperty("Lattitude",latitude);
request.addProperty("Longitude",longitude);
request.addProperty("CurrDate",currentDateTime);
SoapSerializationEnvelope envelope= new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE transportSE = new HttpTransportSE(URL);
try {
transportSE.call(SOAP_ACTION+WEBMETHOD,envelope);
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
responseText=response.toString();
}catch (Exception e){
responseText=e.toString();
System.out.println("EXCEPTION : ===="+responseText);
}
return responseText;
}
例外:
09-14 23:19:25.497 7715-7891 / com.appmap.appmap I / OpenGLRenderer: 初始化的EGL,版本1.4 09-14 23:19:25.535
7715-7891 / com.appmap.appmap D / OpenGLRenderer:启用调试模式0 09-14 23:19:25.964 7715-7973 / com.appmap.appmap I / System.out: EXCEPTION:==== java.lang.RuntimeException:无法序列化: 28.6288657 09-14 23:19:26.105 7715-7891 / com.appmap.appmap V / RenderScript:应用程序请求CPU执行09-14 23:19:26.120 7715-7891 / com.appmap.appmap V / RenderScript:0xb74204b8启动 线程,CPU 4 09-14 23:19:27.689 7715-7913 / com.appmap.appmap I / b:收到的API令牌: AH0uPGFDNqYMrDR-8lmz9Mh9j0Qur4LRfiyR1LRZKIiDYe_RIucfdjJDgP0Q4xIsSYTz-jM_rY94NfXq7RqN3molPtWgF73yHQkcxrLLtPVZgs9YAAFw51uBUZignwrroaXN1gZ2v-IHt41x5dwRStsY7099cDXw8eCeAJr0Pnper8xHDYU8JbE /过期时间:432000000ms 09-14 23:19:27.689
7715-7913 / com.appmap.appmap I / e:在431700中安排下一次尝试 秒。 09-14 23:19:27.691 7715-7913 / com.appmap.appmap I / g:保存 身份验证令牌09-14 23:19:35.689 7715-7799 / com.appmap.appmap D / Volley: [9286] a.a:请求的HTTP响应=< [] https://clients4.google.com/glm/mmap/api 0x99e6744e正常2> [lifetime = 5545],[size = 217949],[rc = 200],[retryCount = 0] 09-14 23:19:35.693s = maps_android_api& v = 3& action = map_start_up& it = map_load.12088,on_create.2,on_resume.1,init.457& irt = 12088,459,520,457 0x4d844933 NORMAL 10 09-14 23:19: 47.318 7715-9435 / com.appmap.appmap I / System.out:EXCEPTION:==== java.lang.RuntimeException:不能 序列号:28.6297543
请帮我处理这件事。