You can implement either a generic handler (.ashx) or a service compatible with ASP.NET 2.0 (.asmx). Then you need to parse and build the XML either using the .NET classes for XML, or just as you like.
Edit: I received information about WCF, as the question has changed, which makes it irrelevant.
source
share