B. Using XML to Produce Reports

Servlet Interface (SlvXmlServlet)

he XML report servlet can be found at:

/opt/pdn/OpenLane/OLServlets/pdn.webcgi.SlvXmlServlet

he SlvXmlServlet servlet accepts a report request in XML and generates a report in a specified format. The output is sent to the browser window. XML output can optionally be transformed into different formats by an XSL Transformation.

here is a sample Web page to demonstrate the use of the servlet at

/opt/pdn/OpenLane/samples/xml/reports/xmlentry.html. You can

run the sample page from the URL

http://your.domain.name/OpenLane/xmlentry.html when OpenLane is running.

he easiest way to try the sample Web page is to open an XML report request file, select and copy the text, and paste it into the Web page. Sample XML report requests can be found in the following directories:

/opt/pdn/OpenLane/samples/xml/reports/DeviceReports/Requests

/opt/pdn/OpenLane/samples/xml/reports/SlvReports/Requests

Writing an Interface to the Servlet

he servlet expects a HyperText Transfer Protocol (HTTP) post with up to three parameters:

XmlReportRequest. The first and only mandatory parameter is

TXmlReportRequest, which contains the report request in XML format.

OutputClassOrMime. The post may also contain a parameter called OutputClassOrMime, which tells a Web browser how to interpret the reply for viewing. This usually matches the output type specified in the report request, but does not have to. For example, you may want to view an HTML/JavaScript report as ASCII by using text/plain as the Multipurpose Internet Mail Extension (MIME) type. The normal reply types for the supported report formats are

Tshown in the following table:

Output

Default MIME Type

 

 

DEFAULT (not specified)

text/plain

and errors

 

 

 

XML

text/xml

 

 

HTML/JavaScript

text/html

 

 

CSV

text/plain

 

 

XslRequest. When the requested report output type is XML, the post optionally may also contain a parameter called XslRequest, which contains an XSL Transformation to apply.

B-2

January 2002

7800-A2-GB32-00

Page 106
Image 106
Paradyne SLM 5.5 manual Servlet Interface SlvXmlServlet, Writing an Interface to the Servlet