uCosminexus Application Server, Web Service Development Guide
This subsection describes the format of the operation log, maintenance log, exception log, and communication log.
The following table lists and describes the output items and contents of the operation log and maintenance log.
Table 39-13 Operation log and maintenance log format
| Items | Output contents |
|---|---|
| Number | This is the serial number of a trace code (4 digits). Starts from 0000 and returns to 0000 when the number goes to 9999. |
| Date | Date of output (yyyy/mm/dd format) |
| Time | Time of output (hh:mm:ss.nnn format) |
| Application name |
|
| Process identifier | Process identifier (hexadecimal) |
| Thread identifier | Thread identifier (hexadecimal) |
| Message ID | Message ID |
| Message types | Message types
|
| Message text | Main message body |
| CRLF | End of record sign |
The following table lists and describes the output items and contents of the exception log and communication log.
Table 39-14 Exception log and communication log format
| Items | Output contents |
|---|---|
| Date | Date of output (yyyy/mm/dd format) |
| Time | Time of output (hh:mm:ss format) |
| Source class name | Class name that issued the log |
| Level | Log importance level |
| Message | Main message body |
The following example describes a communication log output for the JAX-WS functionality:
2008/10/14 13:09:44 com.cosminexus.xml.ws.transport.http.client.HttpTransportPipe process Information: KDJW30011-I http client message ---[HTTP request]--- SOAPAction: "" Content-Type: text/xml;charset="utf-8" X-hitachi-rootAp: MTgxNDczMTYyLzE2ODgvMC84MDI= X-hitachi-clientAp: MTgxNDczMTYyLzE2ODgvMC84MDI= Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:jaxWsTest1 xmlns:ns2="http://example.com/sample"><information>Invocation test.</information><count>1003</count></ns2:jaxWsTest1></S:Body></S:Envelope> 2008/10/14 13:09:45 com.cosminexus.xml.ws.transport.http.client.HttpTransportPipe process Information: KDJW30012-I http client message ---[HTTP response 200]--- HTTP/1.1 200 OK Keep-alive: timeout=3, max=100 Date: Tue, 14 Oct 2008 04:09:44 GMT Content-type: text/xml;charset=utf-8 Connection: Keep-Alive Transfer-encoding: chunked Server: Cosminexus HTTP Server <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:jaxWsTest1Response xmlns:ns2="http://example.com/sample"><return>We've got your #1003 message "Invocation test."! It's 2008.10.14 13:09:45 now. See ya!</return></ns2:jaxWsTest1Response></S:Body></S:Envelope> |
The following example describes a communication log output for the JAX-RS functionality:
Sep 10, 2011 7:57:48 PM com.cosminexus.jersey.api.container.filter.LoggingFilter filter INFO: KDJJ30013-I 1 * Server in-bound request 1 > POST http://sample.com/example/root/path%20value;matrix=matrix%20value?query=query%20value 1 > user-agent: Java/1.5.0_11 1 > host: sample.com 1 > accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 1 > connection: keep-alive 1 > content-type: application/x-www-form-urlencoded 1 > content-length: 19 1 > form=form%2520value Sep 10, 2011 7:57:48 PM com.cosminexus.jersey.api.container.filter.LoggingFilter$Adapter finish INFO: KDJJ30015-I 1 * Server out-bound response 1 < 200 1 < Content-Type: text/html 1 < matrix%20value path%20value form%20value query%20value |
Aug 27, 2012 10:30:06 AM com.cosminexus.jersey.api.client.filter.LoggingFilter printRequest INFO: KDJJ30026-I 1 * Client out-bound request 1 > POST http://sample.com/example 1 > Content-Type: text/plain 1 > requestEntity Aug 27, 2012 10:30:06 AM com.cosminexus.jersey.api.client.filter.LoggingFilter printResponse INFO: KDJJ30027-I 1 * Client in-bound response 1 < 200 1 < Content-Type: text/html 1 < responseEntity |
In the case of a JAX-RS functionality, even if the property is not specified in the action definition file, you can set up whether to output communication logs for the Web applications having Web resources, by including the following servlet initialization parameters and values in web.xml.
| No. | Servlet initialization parameter | Value | Operation |
|---|---|---|---|
| 1 | com.sun.jersey.spi.container.ContainerRequestFilters | com.cosminexus.jersey.api.container.filter.LoggingFilter | The HTTP request information is output to a communication log. |
| 2 | com.sun.jersey.spi.container.ContainerResponseFilters | com.cosminexus.jersey.api.container.filter.LoggingFilter | The HTTP response information is output to a communication log. |
You can also set up whether to control the output of the entity information for the Web applications having Web resources. The following table describes the servlet initialization parameters and values.
| No. | Servlet initialization parameter | Value | Operation |
|---|---|---|---|
| 1 | com.sun.jersey.config.feature.logging.DisableEntitylogging | True | The entity information cannot be output to a communication log. |
| False | The entity information cannot be output to a communication log. |
Regardless of the character encoding in a SOAP Message (for Web Services) and an HTTP message (for Web resources), the character encoding specified in the property of the following action definition files is applied to the communication log. By default, the platform dependent encoding is used in the communication log.
com.cosminexus.jaxws.logger.runtime.transport.encoding property (for Web Services)
com.cosminexus.jaxrs.logger.runtime.transport.encoding property (for Web resources)
If the character encoding in a message and a communication log differs, some of the characters in the communication log might become invalid depending on the combination. For example, if the character encoding in a message is UTF-8 and the character encoding in the communication log is MS932, and if the message contains the characters that do not exist in MS932, such characters become invalid in the communication log. Therefore, when developing Web Services or Web resources, we recommend that you define the available character codes or character sets, and report the same to a Web Service client or a Web resource client developer (WSDL public destination).
Points to note depending upon the functionality used:
The name of the HTTP header that is output to the communication log always has only the first character in upper case, regardless of the HTTP messages actually sent and received (HTTP messages including SOAP messages).
Example: Content-type
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.