import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class GetReportKeyHistory
{
@DataMember
public String keyId = null;
@DataMember
public Date from = null;
@DataMember
public Date to = null;
public String getKeyId() { return keyId; }
public GetReportKeyHistory setKeyId(String value) { this.keyId = value; return this; }
public Date getFrom() { return from; }
public GetReportKeyHistory setFrom(Date value) { this.from = value; return this; }
public Date getTo() { return to; }
public GetReportKeyHistory setTo(Date value) { this.to = value; return this; }
}
@DataContract
public static class GetReportKeyHistoryResponse
{
@DataMember
public ArrayList<KeyHistory> list = null;
@DataMember
public ResponseStatus responseStatus = null;
public ArrayList<KeyHistory> getList() { return list; }
public GetReportKeyHistoryResponse setList(ArrayList<KeyHistory> value) { this.list = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetReportKeyHistoryResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class KeyHistory
{
@DataMember
public String unitId = null;
@DataMember
public Date time = null;
@DataMember
public Location location = null;
@DataMember
public Address address = null;
@DataMember
public Integer heading = null;
@DataMember
public Double speed = null;
@DataMember
public Double km = null;
@DataMember
public Double run1 = null;
@DataMember
public Double run2 = null;
@DataMember
public Double runOdo = null;
@DataMember
public Double temperature1 = null;
@DataMember
public Double temperature2 = null;
@DataMember
public Boolean input1 = null;
@DataMember
public Boolean input2 = null;
@DataMember
public Boolean output3 = null;
@DataMember
public Double batteryLevel = null;
@DataMember
public Double externalPower = null;
public String getUnitId() { return unitId; }
public KeyHistory setUnitId(String value) { this.unitId = value; return this; }
public Date getTime() { return time; }
public KeyHistory setTime(Date value) { this.time = value; return this; }
public Location getLocation() { return location; }
public KeyHistory setLocation(Location value) { this.location = value; return this; }
public Address getAddress() { return address; }
public KeyHistory setAddress(Address value) { this.address = value; return this; }
public Integer getHeading() { return heading; }
public KeyHistory setHeading(Integer value) { this.heading = value; return this; }
public Double getSpeed() { return speed; }
public KeyHistory setSpeed(Double value) { this.speed = value; return this; }
public Double getKm() { return km; }
public KeyHistory setKm(Double value) { this.km = value; return this; }
public Double getRun1() { return run1; }
public KeyHistory setRun1(Double value) { this.run1 = value; return this; }
public Double getRun2() { return run2; }
public KeyHistory setRun2(Double value) { this.run2 = value; return this; }
public Double getRunOdo() { return runOdo; }
public KeyHistory setRunOdo(Double value) { this.runOdo = value; return this; }
public Double getTemperature1() { return temperature1; }
public KeyHistory setTemperature1(Double value) { this.temperature1 = value; return this; }
public Double getTemperature2() { return temperature2; }
public KeyHistory setTemperature2(Double value) { this.temperature2 = value; return this; }
public Boolean isInput1() { return input1; }
public KeyHistory setInput1(Boolean value) { this.input1 = value; return this; }
public Boolean isInput2() { return input2; }
public KeyHistory setInput2(Boolean value) { this.input2 = value; return this; }
public Boolean isOutput3() { return output3; }
public KeyHistory setOutput3(Boolean value) { this.output3 = value; return this; }
public Double getBatteryLevel() { return batteryLevel; }
public KeyHistory setBatteryLevel(Double value) { this.batteryLevel = value; return this; }
public Double getExternalPower() { return externalPower; }
public KeyHistory setExternalPower(Double value) { this.externalPower = value; return this; }
}
@DataContract
public static class Location
{
@DataMember
public Double latitude = null;
@DataMember
public Double longitude = null;
public Double getLatitude() { return latitude; }
public Location setLatitude(Double value) { this.latitude = value; return this; }
public Double getLongitude() { return longitude; }
public Location setLongitude(Double value) { this.longitude = value; return this; }
}
@DataContract
public static class Address
{
@DataMember
public String country = null;
@DataMember
public String zipCode = null;
@DataMember
public String city = null;
@DataMember
public String streetAddress = null;
public String getCountry() { return country; }
public Address setCountry(String value) { this.country = value; return this; }
public String getZipCode() { return zipCode; }
public Address setZipCode(String value) { this.zipCode = value; return this; }
public String getCity() { return city; }
public Address setCity(String value) { this.city = value; return this; }
public String getStreetAddress() { return streetAddress; }
public Address setStreetAddress(String value) { this.streetAddress = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap11 suffix or ?format=soap11
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap11 HTTP/1.1
Host: api.trackunit.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: GetReportKeyHistory
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetReportKeyHistory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<From>0001-01-01T00:00:00</From>
<KeyId>String</KeyId>
<To>0001-01-01T00:00:00</To>
</GetReportKeyHistory>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetReportKeyHistoryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <List> <KeyHistory> <Address> <City>String</City> <Country>String</Country> <StreetAddress>String</StreetAddress> <ZipCode>String</ZipCode> </Address> <BatteryLevel>0</BatteryLevel> <ExternalPower>0</ExternalPower> <Heading>0</Heading> <Input1>false</Input1> <Input2>false</Input2> <Km>0</Km> <Location> <Latitude>0</Latitude> <Longitude>0</Longitude> </Location> <Output3>false</Output3> <Run1>0</Run1> <Run2>0</Run2> <RunOdo>0</RunOdo> <Speed>0</Speed> <Temperature1>0</Temperature1> <Temperature2>0</Temperature2> <Time>0001-01-01T00:00:00</Time> <UnitId>String</UnitId> </KeyHistory> </List> <ResponseStatus> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </Meta> </ResponseError> </Errors> <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </Meta> </ResponseStatus> </GetReportKeyHistoryResponse> </soap:Body> </soap:Envelope>