POST | /vehicleownership/ |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class VehicleOwnership
{
public String CiamId = null;
public Short ItemsPerPage = null;
public Short PageNumber = null;
public String SearchString = null;
public String SortColumn = null;
public String SortDirection = null;
public String getCiamId() { return CiamId; }
public VehicleOwnership setCiamId(String value) { this.CiamId = value; return this; }
public Short getItemsPerPage() { return ItemsPerPage; }
public VehicleOwnership setItemsPerPage(Short value) { this.ItemsPerPage = value; return this; }
public Short getPageNumber() { return PageNumber; }
public VehicleOwnership setPageNumber(Short value) { this.PageNumber = value; return this; }
public String getSearchString() { return SearchString; }
public VehicleOwnership setSearchString(String value) { this.SearchString = value; return this; }
public String getSortColumn() { return SortColumn; }
public VehicleOwnership setSortColumn(String value) { this.SortColumn = value; return this; }
public String getSortDirection() { return SortDirection; }
public VehicleOwnership setSortDirection(String value) { this.SortDirection = value; return this; }
}
public static class VehicleOwnershipResponse
{
public ReturnStatus Status = null;
public Short NumberOfPages = null;
public Short TotalNumberOfVehicles = null;
public ArrayList<Vehicle> Vehicles = null;
public ReturnStatus getStatus() { return Status; }
public VehicleOwnershipResponse setStatus(ReturnStatus value) { this.Status = value; return this; }
public Short getNumberOfPages() { return NumberOfPages; }
public VehicleOwnershipResponse setNumberOfPages(Short value) { this.NumberOfPages = value; return this; }
public Short getTotalNumberOfVehicles() { return TotalNumberOfVehicles; }
public VehicleOwnershipResponse setTotalNumberOfVehicles(Short value) { this.TotalNumberOfVehicles = value; return this; }
public ArrayList<Vehicle> getVehicles() { return Vehicles; }
public VehicleOwnershipResponse setVehicles(ArrayList<Vehicle> value) { this.Vehicles = value; return this; }
}
public static class ReturnStatus
{
public String ReturnCode = null;
public String Message = null;
public String getReturnCode() { return ReturnCode; }
public ReturnStatus setReturnCode(String value) { this.ReturnCode = value; return this; }
public String getMessage() { return Message; }
public ReturnStatus setMessage(String value) { this.Message = value; return this; }
}
public static class Vehicle
{
public String ChassisNumber = null;
public String RegistrationNumber = null;
public String CommissionNumber = null;
public String Make = null;
public String Model = null;
public Date NextMOTDate = null;
public Date NextServiceDate = null;
public String getChassisNumber() { return ChassisNumber; }
public Vehicle setChassisNumber(String value) { this.ChassisNumber = value; return this; }
public String getRegistrationNumber() { return RegistrationNumber; }
public Vehicle setRegistrationNumber(String value) { this.RegistrationNumber = value; return this; }
public String getCommissionNumber() { return CommissionNumber; }
public Vehicle setCommissionNumber(String value) { this.CommissionNumber = value; return this; }
public String getMake() { return Make; }
public Vehicle setMake(String value) { this.Make = value; return this; }
public String getModel() { return Model; }
public Vehicle setModel(String value) { this.Model = value; return this; }
public Date getNextMOTDate() { return NextMOTDate; }
public Vehicle setNextMOTDate(Date value) { this.NextMOTDate = value; return this; }
public Date getNextServiceDate() { return NextServiceDate; }
public Vehicle setNextServiceDate(Date value) { this.NextServiceDate = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /vehicleownership/ HTTP/1.1
Host: webservices.mbukdatabase.co.uk
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<VehicleOwnership xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RAPP.Mercedes.VanCustomerAccount.Api.ServiceModel.SitecoreServiceModels">
<CiamId>String</CiamId>
<ItemsPerPage>0</ItemsPerPage>
<PageNumber>0</PageNumber>
<SearchString>String</SearchString>
<SortColumn>String</SortColumn>
<SortDirection>String</SortDirection>
</VehicleOwnership>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <VehicleOwnershipResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RAPP.Mercedes.VanCustomerAccount.Api.ServiceModel.SitecoreServiceModels"> <NumberOfPages>0</NumberOfPages> <Status> <Message>String</Message> <ReturnCode>String</ReturnCode> </Status> <TotalNumberOfVehicles>0</TotalNumberOfVehicles> <Vehicles> <Vehicle> <ChassisNumber>String</ChassisNumber> <CommissionNumber>String</CommissionNumber> <Make>String</Make> <Model>String</Model> <NextMOTDate>0001-01-01T00:00:00</NextMOTDate> <NextServiceDate>0001-01-01T00:00:00</NextServiceDate> <RegistrationNumber>String</RegistrationNumber> </Vehicle> </Vehicles> </VehicleOwnershipResponse>