using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using IDB.API.DTO.Globalization;
namespace IDB.API.DTO.Globalization
{
public partial class GetTranslations
{
public GetTranslations()
{
TranslateKeys = new List<string>{};
}
public virtual List<string> TranslateKeys { get; set; }
}
[DataContract]
public partial class GetTranslationsResponse
{
public GetTranslationsResponse()
{
Translations = new List<Translation>{};
}
[DataMember]
public virtual List<Translation> Translations { get; set; }
[DataMember]
public virtual string PreferredLanguage { get; set; }
[DataMember]
public virtual string PreferredLanguageShort { get; set; }
}
[DataContract]
public partial class Translation
: ITranslation
{
[DataMember]
public virtual string Key { get; set; }
[DataMember]
public virtual string NL { get; set; }
[DataMember]
public virtual string EN { get; set; }
[DataMember]
public virtual string DE { get; set; }
[DataMember]
public virtual string FR { get; set; }
[DataMember]
public virtual string C1 { get; set; }
[DataMember]
public virtual string C2 { get; set; }
[DataMember]
public virtual string C3 { get; set; }
[DataMember]
public virtual string C4 { get; set; }
[DataMember]
public virtual string C5 { get; set; }
[DataMember]
public virtual string C6 { get; set; }
}
}
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 /xml/reply/GetTranslations HTTP/1.1
Host: doapigw.baasbv.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetTranslations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Globalization">
<TranslateKeys xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TranslateKeys>
</GetTranslations>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetTranslationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Globalization">
<PreferredLanguage>String</PreferredLanguage>
<PreferredLanguageShort>String</PreferredLanguageShort>
<Translations>
<Translation>
<C1>String</C1>
<C2>String</C2>
<C3>String</C3>
<C4>String</C4>
<C5>String</C5>
<C6>String</C6>
<DE>String</DE>
<EN>String</EN>
<FR>String</FR>
<Key>String</Key>
<NL>String</NL>
</Translation>
</Translations>
</GetTranslationsResponse>