To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
HTTP + XML
The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /xml/reply/BulkPoISearch HTTP/1.1
Host: api-dev.1881.no
Content-Type: application/xml
Content-Length: length
<BulkPoISearch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/O1881.SearchAdapter.ServiceModel">
<Fields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Fields>
<Filters xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Filters>
<Profile>String</Profile>
<DisableFuzzyHits>false</DisableFuzzyHits>
<Type>String</Type>
</BulkPoISearch>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PoISearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/O1881.SearchAdapter.ServiceModel">
<Facets>
<Facet>
<Type>String</Type>
<Values>
<FacetValue>
<Count>0</Count>
<FilterValue>String</FilterValue>
<Value>String</Value>
</FacetValue>
</Values>
</Facet>
</Facets>
<NumberOfHits>0</NumberOfHits>
<Profile>String</Profile>
<QueryTimeMilliSeconds>0</QueryTimeMilliSeconds>
<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:ResponseError>
</d2p1:Errors>
</ResponseStatus>
<Version>String</Version>
<Hits>
<PoIHit>
<PoI>
<Id>String</Id>
<Name>String</Name>
<StreetAddress>
<AddressText>String</AddressText>
<CityArea>String</CityArea>
<CitySector>String</CitySector>
<Coordinate>
<Latitude>0</Latitude>
<Longitude>0</Longitude>
</Coordinate>
<Country>String</Country>
<County>String</County>
<HouseLetter>String</HouseLetter>
<HouseNumber>String</HouseNumber>
<Municipality>String</Municipality>
<MunicipalityCode>String</MunicipalityCode>
<PostalArea>String</PostalArea>
<PostalCode>String</PostalCode>
<Region>String</Region>
<StreetName>String</StreetName>
<TradeArea>String</TradeArea>
<TradeAreaId>0</TradeAreaId>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
</StreetAddress>
<Values>
<KeyValue>
<Key>String</Key>
<Type>String</Type>
<Value>String</Value>
</KeyValue>
</Values>
</PoI>
<Score>0</Score>
</PoIHit>
</Hits>
</PoISearchResponse>