| GET | /WebApp/Nutzer |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class GetNutzer
{
@DataMember(Name="filter[Name]")
@SerializedName("filter[Name]")
@ApiMember(ParameterType="query")
public String name = null;
@DataMember(Name="filter[Street]")
@SerializedName("filter[Street]")
@ApiMember(ParameterType="query")
public String street = null;
public String getName() { return name; }
public GetNutzer setName(String value) { this.name = value; return this; }
public String getStreet() { return street; }
public GetNutzer setStreet(String value) { this.street = value; return this; }
}
public static class GetNutzerResponse
{
public ArrayList<NutzerFilter> nutzerFilter = null;
public ResponseStatus responseStatus = null;
public ArrayList<NutzerFilter> getNutzerFilter() { return nutzerFilter; }
public GetNutzerResponse setNutzerFilter(ArrayList<NutzerFilter> value) { this.nutzerFilter = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetNutzerResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class NutzerFilter
{
@DataMember(Name="Name1")
@SerializedName("Name1")
public String name1 = null;
@DataMember(Name="Name2")
@SerializedName("Name2")
public String name2 = null;
@DataMember(Name="Appointments")
@SerializedName("Appointments")
public ArrayList<Appointment> appointments = null;
@DataMember(Name="Address")
@SerializedName("Address")
public Address address = null;
public String getName1() { return name1; }
public NutzerFilter setName1(String value) { this.name1 = value; return this; }
public String getName2() { return name2; }
public NutzerFilter setName2(String value) { this.name2 = value; return this; }
public ArrayList<Appointment> getAppointments() { return appointments; }
public NutzerFilter setAppointments(ArrayList<Appointment> value) { this.appointments = value; return this; }
public Address getAddress() { return address; }
public NutzerFilter setAddress(Address value) { this.address = value; return this; }
}
@DataContract
public static class Appointment
{
@DataMember(Name="Guid")
@SerializedName("Guid")
public UUID guid = null;
@DataMember(Name="Von")
@SerializedName("Von")
public Date from = null;
@DataMember(Name="Bis")
@SerializedName("Bis")
public Date to = null;
@DataMember(Name="Monteure")
@SerializedName("Monteure")
public IList<AppointmentStoreUser> appointmentStoreUsers = null;
@DataMember(Name="Nutzeinheiten")
@SerializedName("Nutzeinheiten")
public IList<AppointmentNutzeinheit> appointmentNutzeinheiten = null;
public UUID getGuid() { return guid; }
public Appointment setGuid(UUID value) { this.guid = value; return this; }
public Date getFrom() { return from; }
public Appointment setFrom(Date value) { this.from = value; return this; }
public Date getTo() { return to; }
public Appointment setTo(Date value) { this.to = value; return this; }
public IList<AppointmentStoreUser> getAppointmentStoreUsers() { return appointmentStoreUsers; }
public Appointment setAppointmentStoreUsers(IList<AppointmentStoreUser> value) { this.appointmentStoreUsers = value; return this; }
public IList<AppointmentNutzeinheit> getAppointmentNutzeinheiten() { return appointmentNutzeinheiten; }
public Appointment setAppointmentNutzeinheiten(IList<AppointmentNutzeinheit> value) { this.appointmentNutzeinheiten = value; return this; }
}
@DataContract
public static class AppointmentStoreUser
{
@DataMember(Name="MonteurGuid")
@SerializedName("MonteurGuid")
public UUID storeUserId = null;
public UUID getStoreUserId() { return storeUserId; }
public AppointmentStoreUser setStoreUserId(UUID value) { this.storeUserId = value; return this; }
}
@DataContract
public static class AppointmentNutzeinheit
{
@DataMember(Name="NutzeinheitGuid")
@SerializedName("NutzeinheitGuid")
public UUID nutzeinheitGuid = null;
public UUID getNutzeinheitGuid() { return nutzeinheitGuid; }
public AppointmentNutzeinheit setNutzeinheitGuid(UUID value) { this.nutzeinheitGuid = value; return this; }
}
public static class Address
{
@DataMember(Name="Guid")
@SerializedName("Guid")
public UUID guid = null;
@DataMember(Name="Street")
@SerializedName("Street")
public String street = null;
@DataMember(Name="Hausnummer")
@SerializedName("Hausnummer")
public String streetNumber = null;
@DataMember(Name="Postleitzahl")
@SerializedName("Postleitzahl")
public String zipcode = null;
@DataMember(Name="Ort")
@SerializedName("Ort")
public String city = null;
public UUID getGuid() { return guid; }
public Address setGuid(UUID value) { this.guid = value; return this; }
public String getStreet() { return street; }
public Address setStreet(String value) { this.street = value; return this; }
public String getStreetNumber() { return streetNumber; }
public Address setStreetNumber(String value) { this.streetNumber = 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; }
}
}
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.
GET /WebApp/Nutzer HTTP/1.1 Host: calotec-portal-servamw.eras-online.de Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetNutzerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Eras2WebApp.Filter">
<NutzerFilter>
<NutzerFilter>
<Address>
<City>String</City>
<Guid>00000000-0000-0000-0000-000000000000</Guid>
<Street>String</Street>
<StreetNumber>String</StreetNumber>
<Zipcode>String</Zipcode>
</Address>
<Appointments>
<NutzerFilter.Appointment>
<From>0001-01-01T00:00:00</From>
<Guid>00000000-0000-0000-0000-000000000000</Guid>
<To>0001-01-01T00:00:00</To>
</NutzerFilter.Appointment>
</Appointments>
<Name1>String</Name1>
<Name2>String</Name2>
</NutzerFilter>
</NutzerFilter>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1: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>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1: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>
</d2p1:Meta>
</ResponseStatus>
</GetNutzerResponse>