Transforming Messages with XSLT Filters

Transforming Messages with XSLT Filters

You can apply XSLT transformation rules to a web service end point. This enables fine-grained control of web service requests and responses. You can apply multiple XSLT rules to a web service end point method, and you can configure the order in which you apply the transformations. All the XSLT files are stored in thegenerated/xml/appOrModule directory of the central repository. These transformation rules are synchronized to the remote server instances.

You can apply transformation rule to a SOAP request or response.

To add a transformation rule to apply to a web service operation with Admin Console, select Applications > Web Services > web-service-name Transformation. Click Add.

A list of transformation rule available for this web service end point is displayed.

Browse to the location of the XSLT file that contains the transformation rule. All the generated XSLT files are stored in thegenerated/xml/application or module name/ directory.

If you add multiple transformation rules for a web service endpoint, the transformation rules are applied in the order in which they are added.

To enable a transformation rule, in the Transformation Rules page select the check box corresponding to the rule, then click Enable. To disable the a rule, click Disable.

To remove a transformation rule, in the Transformation Rules page select the check box corresponding to the rule, then click Remove. This removes the transformation rule from the list. If this transformation rule is applied to a web service endpoint, it is automatically disabled. However, the XSLT file remains in the file path location. Other web service endpoints can use this XSLT file.

Monitoring Web Services

Admin console can track and graphically display operational statistics for web services, and can display messages sent and received by web services.

To enable monitoring for a web service, with Admin Console, select Applications > Web Services > web-service-name Monitor Configuration.

In the Monitoring Configuration page, set the monitoring level:

LOW- Monitors response time, throughput, total number of requests, and faults for the web service. Does not perform method-level monitoring.

HIGH- Adds message tracing and monitoring of number of requests per second, average response time, and throughput attributes.

158

Sun GlassFish Enterprise Server 2.1 Administration Guide • December 2008

Page 158
Image 158
Sun Microsystems 820433510 manual Transforming Messages with Xslt Filters, Monitoring Web Services