XML
  Home arrow XML arrow Designing Your Own Reporting Service: A We...
IBM developerWorks
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Designing Your Own Reporting Service: A Web Service to Convert XML to HTML Using XSL
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2005-12-19

    Table of Contents:
  • Designing Your Own Reporting Service: A Web Service to Convert XML to HTML Using XSL
  • Developing the XML Web Service
  • Developing the XML Web Service continued
  • Defining the XSLT
  • Executing and testing the XML Web Service
  • Understanding the web service
  • Improvements to the solution

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Designing Your Own Reporting Service: A Web Service to Convert XML to HTML Using XSL


    (Page 1 of 7 )

    This article guides you in developing a web service which converts a given XML string to HTML based on XSL file available at server side.
    A downloadable file for this article is available here.

    The sample downloadable solution (WSXML2HTML) is entirely developed using Visual Studio.NET 2003 Enterprise Architect on Windows Server 2003 Standard Edition.  Even though I didn’t really test the solution on any of the previous Windows OSes, I believe it should work on any Windows OS supported by the .NET Framework 1.1.  If it is not working, do not hesitate to drop me a line.

    Brief explanation of an “XML to HTML” XML Web Service

    I already contributed several articles explaining Web Services along with SOA (Service Oriented Architecture) which you can read over at www.devshed.com.  So, we will not go through the basics of web services any further in this article.  I also assume that you have an understanding of how to create basic Web Services using Visual Studio.NET.

    The XML web service, which we are going to develop now, simply accepts an XML string (which is really of type “string”) and converts it to HTML based on the XSL stayed (hosted) at the server. Once we host this XML Web Service, we can access it in any application of any platform using any language, even remotely!

    Let us come to the discussion of the inner workings of the “XML to HTML” Web service.  Even though the main method is “BuildHTMLString”, the heart (or processing) of the entire XML web service is divided into two “private” methods as follows:

    • GenerateHTMLString
    • GetXSLLocation

    “GetXSLLocation” is a very simple method, which returns the path of the XSL file defined specified within “Web.Config” file.  The method has been used just for the sake of clarity and not necessary to give very much importance at the moment.  The entire logic is defined within “GenerateHTMLString” method (which is considered to be the heart of our web service). 

    Now, let us stop the stories and start developing it.

    More XML Articles
    More By Jagadish Chaterjee


       · Did you ever think of designing your own simple reporting service with technologies...
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway