0

We use custom serialization schemas for xml serialization of our objects. I have a WCF REST Service written with the WCF Service Tempalte. I want to return our custom XML from this method however when i set the return to string, I instead get this :

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">

&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;ReportResponse&gt;&lt;Status&gt;Success&lt;/Status&gt;&lt;Url&gt;http://pictor.blob.core.windows.net/pictor/ServiceTest.pdf&lt;/Url&gt;&lt;ReportRequestId&gt;00000000-0000-0000-0000-000000000000&lt;/ReportRequestId&gt;&lt;/ReportResponse&gt;

</string>

As you can see my xml is wrapped in a html encoded string.. How do i return the appropriate xml response ?

BentOnCoding
  • 27,307
  • 14
  • 64
  • 92

1 Answers1

1

Using XElement as a response type allows me to return whatever xml I so choose. Credit for this answer goes to @Mark Gravell.

BentOnCoding
  • 27,307
  • 14
  • 64
  • 92