Designing Your Own Reporting Service: A Web Service to Convert XML to HTML Using XSL - Developing the XML Web Service (Page 2 of 7 )
Create a new Web Service project (with respect to C#) using Visual Studio.NET 2003 Enterprise Architect and make modifications to your “web.config” file as follows:
Open your “XML2HTML.asmx.cs” (I renamed “Service1.*” to “XML2HTML.*”) and make modifications to your service as follows.
Before proceeding further, you need to remove (or comment) all the statements related to the “HelloWorld” method (as it is intended only for demonstration).
Start with a new method “BuildHTMLString” as follows:
[WebMethod(Description="Builds an HTML string from XML.")]
public string BuildHTMLString(string XML)
{
return GenerateHTMLString(XML);
}
Within the above method, no processing really exists. Let us add one more method as follows: