我在日志中遇到问题我看到了:
java.lang.RuntimeException: double ID
03-22 11:59:53.643 12534-12592/pl.eltegps.pgo W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.resolveReference(SoapSerializationEnvelope.java:462)
03-22 11:59:53.643 12534-12592/pl.eltegps.pgo W/System.err: at pl.eltegps.pgo.soap.CustomSoapEnvelope.resolveReference(CustomSoapEnvelope.java:29)
03-22 11:59:53.643 12534-12592/pl.eltegps.pgo W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelope.java:439)
03-22 11:59:53.643 12534-12592/pl.eltegps.pgo W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.readUnknown(SoapSerializationEnvelope.java:304)
03-22 11:59:53.643 12534-12592/pl.eltegps.pgo W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelope.java:434)
03-22 11:59:53.643 12534-12592/pl.eltegps.pgo W/System.err: at org.ksoap2.serialization.SoapSerializationEnvelope.readUnknown(SoapSerializationEnvelope.java:304)
这是我的CustomSoapEnvelope类:
public class CustomSoapEnvelope extends SoapSerializationEnvelope {
public static final String TAG = CustomSoapEnvelope.class.getSimpleName();
public CustomSoapEnvelope(int version) {
super(version);
}
@Override
public void writeObjectBody(XmlSerializer writer, KvmSerializable obj) throws IOException {
if (obj instanceof CustomSoapObject) {
if (!((CustomSoapObject)obj).hasChildNodes()) {
writer.text(((CustomSoapObject)obj).getPropertyValue());
}
}
super.writeObjectBody(writer, obj);
}
@Override
protected void resolveReference(String id, Object obj) {
super.resolveReference(id+obj.toString(), obj);
}
}
我这样做了:
CustomSoapEnvelope envelope = new CustomSoapEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
envelope.implicitTypes = true;
HttpTransportSE ht = new HttpTransportSE(URL);
ht.debug = true;
try {
ht.call("\"" + method + "\"", envelope)
我不知道自己做错了什么,为什么我有双重身份证。一个spoapi回报:
<PGOResult pages_count="1" total_records="1" sync_date="2018-03-21T15:59:33+01:00">
<status>1</status>
<PGOList>
<PGO id="50409">
<address full="01-147 KIELCE, TATRZAŃSKA 32 (TALIK DANUTA IRENA )">
<country>POLSKA</country>
<city>KIELCE</city>
<zip>25-000</zip>
<street>TATRZAŃSKA</street>
<house>32</house>
</address>
<location lon="20.6513386" lat="50.8959923"/>
<last_inventory_date>2016-09-22T00:00:00+02:00</last_inventory_date>
<name>01-147 KIELCE, TATRZAŃSKA 32 (TALIK DANUTA IRENA )</name>
<building_type_id>12</building_type_id>
<description>01-147 KIELCE, TATRZAŃSKA 32 (TALIK DANUTA IRENA )</description>
<LoadList>
<Load id="156347" comm_id="2879715">
<container_type_id>2064299931</container_type_id>
<waste_id>21</waste_id>
<last_inventory_date>2016-06-02T09:00:35+02:00</last_inventory_date>
<cycle_id>29</cycle_id>
</Load>
<Load id="156348" comm_id="2879716">
<container_type_id>2064299931</container_type_id>
<waste_id>20</waste_id>
<last_inventory_date>2016-06-02T09:00:35+02:00</last_inventory_date>
<cycle_id>29</cycle_id>
</Load>
<Load id="156346" comm_id="2879717">
<container_type_id>2064299931</container_type_id>
<waste_id>19</waste_id>
<last_inventory_date>2016-06-02T09:00:35+02:00</last_inventory_date>
<cycle_id>47</cycle_id>
</Load>
<Load id="123687" comm_id="2879718">
<container_type_id>289485416</container_type_id>
<waste_id>10</waste_id>
<rfid_1>40000003E6B6E3</rfid_1>
<last_inventory_date>2016-05-13T08:38:11+02:00</last_inventory_date>
<cycle_id>29</cycle_id>
</Load>
</LoadList>
</PGO>
</PGOList>
</PGOResult>
这个错误在所有请求中都不重复,有时候我没有这个错误。我在活动中看到了列表。但是根据这个请求和这个数据,我有一个错误。我不知道如何修复这个