[WebHelp(Comment="Returns the locations for the user")]
[WebGet(UriTemplate = "GetLocations?appid={id}")]
[OperationContract]
string GetLocations(string id)
{
// Authentication Check
// if (id is valid) then continue to run
Location l = new Location();
// get the xml segment manually for now
string loc = System.IO.File.ReadAllText(@"C:
\TestLocation.xml");
l.LoadXML(loc);
return l.LocationXML;
}
So I am trying to build a WCF REST service and I cannot use the
DataContract and DataMember attributes to build a properly formatted
XML document. The client's specifications need a few variants, and I
simply cannot use DataContract/DataMember because of the limited
control.
Anyway, the above generates a perfectly valid XML segment for that
particular location, but when it returns to the Server, it has
stripped all the HTML segments and replaced them with > and <
for instance.
I cannot find any setting or attribute that i can include to simply
return my raw text back to the client requesting this data.
Does anyone have any ideas?