System.IO.InvalidDataException: MetaData is potentially malicious. Expected scalar value, Received: The altitude of an address - the altitude above sea level." at ServiceStack.NativeTypes.VbNet.VbNetGeneratorExtensions.SafeValue(String value) at ServiceStack.NativeTypes.VbNet.VbNetGeneratorExtensions.QuotedSafeValue(String value) at ServiceStack.NativeTypes.VbNet.VbNetGenerator.TypeValue(String type, String value) at ServiceStack.NativeTypes.VbNet.VbNetGenerator.AppendAttributes(StringBuilderWrapper sb, List`1 attributes) at ServiceStack.NativeTypes.VbNet.VbNetGenerator.AddProperties(StringBuilderWrapper sb, MetadataType type, Dictionary`2 explicitInterfacesMap, Boolean includeResponseStatus) at ServiceStack.NativeTypes.VbNet.VbNetGenerator.AppendType(StringBuilderWrapper& sb, MetadataType type, String lastNS, List`1 allTypes, CreateTypeOptions options) at ServiceStack.NativeTypes.VbNet.VbNetGenerator.GetCode(MetadataTypes metadata, IRequest request, INativeTypesMetadata nativeTypes) at ServiceStack.NativeTypes.LangGeneratorExtensions.g__Generate|1_0(ILangGenerator gen, <>c__DisplayClass1_0& ) at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(MetadataTypes metadataTypes, MetadataTypesConfig typesConfig, String lang, IRequest req, Action`1 configure) at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(List`1 metadataTypes, String lang, IRequest req, Action`1 configure) at ServiceStack.Metadata.BaseMetadataHandler. d__12.MoveNext()
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/GetContacts HTTP/1.1
Host: production-eros-platform-apisubscription.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetContacts xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription">
<ContactRoles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</ContactRoles>
<ContactTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</ContactTypes>
<CustomContentViewId>00000000-0000-0000-0000-000000000000</CustomContentViewId>
<IncludeStaff>false</IncludeStaff>
<ModifiedSince>0001-01-01T00:00:00</ModifiedSince>
<SuiteDataSourceInstanceId>00000000-0000-0000-0000-000000000000</SuiteDataSourceInstanceId>
</GetContacts>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetContactsModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.WebAPI.ServiceModel"> <ContactStaff xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Causal.Common.Entity" i:nil="true" /> <Contacts i:nil="true" /> </GetContactsModel>