Message Trace
With the monitoring level set at HIGH, you can display the messages for a Web-service endpoint point by clicking the Messages tab of the Monitor page. Each message details the SOAP request, the response time, the status, and the HTTP header. You can also configure the number of messages that are kept in memory, which is 25 by default. Application Server retains in memory the messages for each server instance. Figure 6 is an example of two messages for
To view additional details, click a message in the Messages page. Figure 7 is an example of the details that are then displayed.
In the case of an error in invoking a Web service, the response and status data often provide helpful clues. Click View Request XML to display the details in XML format. Also, if you adopt message-level security, the decrypted content is displayed. Be sure to keep that data private. This AMX code segment searches for all the Web services with
For each endpoint, the Fast Infoset
An Application Server capability, Fast Infoset, specifies a binary format for XML infosets that typically improves performance by two to four times. As soon as you turn on Fast Infoset encoding, the message-trace content adopts that binary format. The client controls the content negotiation in Fast Infoset by means of the standard HTTP headers For details on how to use Fast Infoset, see the pertinent section in its documentation. In addition, a technical article, Fast Infoset, shines a light on the concepts of the specification and other nuances. Call Flow
With the Call Flow capability, you can track the processing time of a request in each of the major Application Server containers, such as the Web, EJB, Java DataBase Connectivity (JDBC), and Object Request Broker (ORB) containers. A Call Flow agent saves that information to a database, which you can then analyze at interception (trap) points to debug performance problems. For example, the flow data often reveal if a request is spending most of its time in a particular container or the backend database. Call Flow is off by default. To turn that on for a running instance from the Administration Console, do the following:
Simply click Call Flow in the bottom row of tabs for the collected Call Flow data. See Figure 8 for an example of the data.
To view the details of the Call Flow, click View Tree. The Administration Console then displays the stored trace data. Application Server EE 9 goes a step further and shows a pie chart that illustrates the distribution of the time the request has spent on each of the components. To focus on certain requests so as to optimize performance, you can filter the data to reflect certain specifics only, for example, the host and user IDs, by specifying the filtering criteria in the Call Flow Configuration page. When filtering is enabled, Application Server generates Call Flow data for only those requests that match the criteria. Afterwards, you can inject requests into a running systemspecifically to generate trace information. You can then watch your requests flow through the system and evaluate the performance of specific types of requests in the context of normal load, bypassing requests from other sources. Transformation
For a fine-grained control of Web-service request and responses, apply eXtensible Stylesheet Language Transformation (XSLT) rules to each of the Web-service endpoints. For example, on New Year's Day, you may want to greet readers with
This file is identical to the content of the SOAP response"with only one exception: the Next, add the XSLT file on the CLI. Type: asadmin create-transformation-rule -webservicename server_HelloImpl#HelloImpl --applyto response --rulefilelocation happyNewYear.xsl In this command, the Figure 9 shows the Transformation Rules page for
Feel free to disable or enable these rules any time. Also, you can apply multiple XSLT rules to the same method in a Web-service endpoint. Application Server applies the rules according to the order in which they are added and stores the XSLT files in the Application Server EE 9 synchronizes the transformation rules to the remote server instances. Now test with either the test form or a client application. To test with the latter, do the following:
If the output reads Be sure to evaluate the pros and cons for adding transformation rules and for revising the application. Applying XSLT can mean a longer processing time for the Web services. In other cases, the XSLT way makes sense, as when a Web service is exposed to partners with different dialects and potentially different security requirements. In that case, transformation rules can act as proxies for the Web service and would be a big plus. | |||||||||||||||||||
|
| ||||||||||||