I am trying to figure out why my HTTPService result in flex is returning back multiple XML headers..
C# WebAPI Service:
[HttpPost, HttpGet]
public List<vwRecord24Category> GetClientCategories(int companyId)
{
var categories = Db.Fetch<vwRecord24Category>(@"SQLQUERY", companyId);
return categories;
}
The result of a call on this webservice is;
<ArrayOfvwRecord24Category xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Record24Entities">
<vwRecord24Category>
<CategoryName>John Doe</CategoryName>
<Name>adsf</Name>
</vwRecord24Category>
<vwRecord24Category>
<CategoryName>John Doe</CategoryName>
<Name>df</Name>
</vwRecord24Category>
<vwRecord24Category>
<CategoryName>John Doe</CategoryName>
<Name>new thing 4</Name>
</vwRecord24Category>
<vwRecord24Category>
<CategoryName>John Doe</CategoryName>
<Name>Surgery Center 1</Name>
</vwRecord24Category>
</ArrayOfvwRecord24Category>
My HttpService inside Flash Builder (ActionScript 3.0):
params.companyId = clientData.data.companyId;
httpService.method = 'POST';
httpService.url = 'http://****.domain.com/record24api/content/GetClientCategories';
httpService.contentType = "application/json";
httpService.resultFormat = "e4x";
httpService.addEventListener(ResultEvent.RESULT, onLibrariesLoaded);
httpService.addEventListener(FaultEvent.FAULT, onLibraryLoadError);
httpService.send(JSON.stringify(params));
Alright so after all of that when the success event is fired my response.result looks like so:

I have been battling this issue for several hours now and I've narrowed down that it can't be my webservice as it's displaying correctly when I do a call to it via chrome or IE. Any suggestions?