I'm getting an SOAP response like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetAllCodesAndLevels
xmlns="http://www.myCodesWeb.com/">
<GetAllCodesAndLevelsResult>[['1/12/2014 10:50:00 PM',1.5,2.2,55.9],['1/16/2014 11:52:00 AM',88.88,88.12,88.99],['1/18/2014 10:12:00 PM',12.3,12.4,12.2]]</GetAllCodesAndLevelsResult>
</GetAllCodesAndLevels>
</soap:Body>
</soap:Envelope>
I'm looking for a way to extract this array and build ArrayList<Code> from Code Class:
Each SOAP array element in the response - ['1/12/2014 10:50:00 PM',1.5,2.2,55.9] suppose to be a Code object.
public class Code {
public double code1;
public double code2;
public double code3;
public int date;
public Code (double code1, double code2, double code3, int date) {
super();
this.code1= code1;
this.code2= code2;
this.code3= code3;
this.date = date;
}
}
How can I do it? do I need to use ksoap2 library or maybe extract it to Json, or maybe use Volley library?