| POST | /files/{NutzerId}/NutzerFile |
|---|
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 FileNutzer extends Eras2FileUpload
{
@DataMember(Name="FileTyp")
@SerializedName("FileTyp")
public Eras2FileType fileType = null;
public Eras2FileType getFileType() { return fileType; }
public FileNutzer setFileType(Eras2FileType value) { this.fileType = value; return this; }
}
@DataContract
public static class Eras2FileUpload
{
@DataMember(Name="UserId")
@SerializedName("UserId")
public String userId = null;
@DataMember(Name="NutzerId")
@SerializedName("NutzerId")
public String nutzerId = null;
@DataMember(Name="DeviceId")
@SerializedName("DeviceId")
public String deviceId = null;
@DataMember(Name="FileTyp")
@SerializedName("FileTyp")
public Eras2FileType fileType = null;
public String getUserId() { return userId; }
public Eras2FileUpload setUserId(String value) { this.userId = value; return this; }
public String getNutzerId() { return nutzerId; }
public Eras2FileUpload setNutzerId(String value) { this.nutzerId = value; return this; }
public String getDeviceId() { return deviceId; }
public Eras2FileUpload setDeviceId(String value) { this.deviceId = value; return this; }
public Eras2FileType getFileType() { return fileType; }
public Eras2FileUpload setFileType(Eras2FileType value) { this.fileType = value; return this; }
}
public static enum Eras2FileType
{
DSatz,
Hka,
E835Satz,
E898Satz,
Abrechnung,
ArgeSatz,
NutzerFile,
DevicePdf;
}
public static class Eras2FileUploadResponse
{
public ResponseStatus responseStatus = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public Eras2FileUploadResponse setResponseStatus(ResponseStatus value) { this.responseStatus = 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 /files/{NutzerId}/NutzerFile HTTP/1.1
Host: inea-servdesk.eras-online.de
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FileNutzer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Files.Upload">
<DeviceId>String</DeviceId>
<FileTyp>DSatz</FileTyp>
<NutzerId>String</NutzerId>
<UserId>String</UserId>
</FileNutzer>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<Eras2FileUploadResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Files.Upload">
<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>
</Eras2FileUploadResponse>