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 /ms/run HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RunMsSimulation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<ExpectedReturn>0</ExpectedReturn>
<Volatility>0</Volatility>
<Years>0</Years>
</RunMsSimulation>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RunMsSimulationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<GraphBalances>
<GraphReturn>
<Med>0</Med>
<Opt1>0</Opt1>
<Opt2>0</Opt2>
<Pess1>0</Pess1>
<Pess2>0</Pess2>
<YearIndex>0</YearIndex>
</GraphReturn>
</GraphBalances>
<GraphReturns>
<GraphReturn>
<Med>0</Med>
<Opt1>0</Opt1>
<Opt2>0</Opt2>
<Pess1>0</Pess1>
<Pess2>0</Pess2>
<YearIndex>0</YearIndex>
</GraphReturn>
</GraphReturns>
</RunMsSimulationResponse>