SOAP Logging/Tracing, including Export, and Attachments
search cancel

SOAP Logging/Tracing, including Export, and Attachments

book

Article ID: 137240

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

What are the methods to which one can run Tomcat tracing to review for activity during Export, Attachments and axis soap Web Services call, such as doQuery or doSelect?

Environment

Release : 17.3 and higher

Component : Svc Desk Web Services

Resolution

You will find the logging under NX_ROOT\log\jsrvr.log.  

Please see Additional Information for older implementations of 17.3 (prior to RU15)

  1. Stop SDM Services

  2. Backup the log4j2.properties file, located in NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd\WEB-INF.

  3. Edit the above file in a text editor and locate this block of text (around line 58)
    logger.usdjws65.name = usdjws65
    logger.usdjws65.level = INFO
  4. Change the above to read as:
    logger.usdjws65.name = usdjws65
    logger.usdjws65.level = DEBUG
  5. Save the log4j2.properties file and start SDM Services

  6. Once logging is no longer needed, stop SDM Services and restore the log4j2.properties file from backuP, then start Services back up.


With the above logging enabled, you will see an entry such as this to indicate that a doQuery was invoked:

09/01 15:41:19.130[http-nio-8080-exec-5] INFO  USDLogHandler ? USDJWS: 9/01/19, 3:41:19 PM EDT - ###.###.###.### - [session id] : doQuery - objectType=cr, whereClause=null 

This shows a call was made from IP address ###.###.###.### on session ID (SID) [session id].  The cr (Call_Req) object was involved and no where clause was specified.  To corroborate the source of the call, look over the earlier log entries that reference the given SID number, which in this case is highlighted in bold above, value [session id] .  

Similarly, for a doSelect:

09/01 15:41:19.130[http-nio-8080-exec-5] INFO  USDLogHandler ? USDJWS: 9/01/19, 3:41:19 PM EDT - ###.###.###.### - [session id] : doSelect - objectType=cr, whereClause=null 

Searching earlier, you will see an entry such as:

09/01 15:39:56.226[http-nio-8080-exec-3] INFO  usdsda ? Web Services session created [session id]; user(USER1); IP(###.###.###.###); session count 2 

The query was invoked by user "USER1" from IP address ###.###.###.###.

For attachments, you may see an entry such as this:
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpRetURL) : value(http://server1234.example.com:8080/CAisd/pdmweb.exe?SID=[session id]+FID=2054+OP=DISPLAY_FORM+HTMPL=attmnt_upload_done.htmpl+KEEP.AttmntParent=cr:400001

04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpRespType) : value(URLText) 


04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(Test) : value() 


04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpServerName) : value(server1234


04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpMaxFileSize) : value(0) 


04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpBpsid) : value(3413942) 


04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 188 Got file data for (itil-content-17.1.txt


04/17 07:29:58.003[http-nio-8080-exec-8] DEBUG UploadAttachment 364 Received data file with size = 10737 


04/17 07:29:58.003[http-nio-8080-exec-8] DEBUG UploadAttachment 199 Copied data to temporary file: d7ff9b48-4758-4268-81ff-08a3eb7161ed3569176598503667533.gz 


This shows that file "itil-content-17.1.txt" was uploaded to a request ticket with persid "cr:400001" to attachment server "server1234" based on the highlights in the above logging in bold.

Additional Information

The above logging applies to any Tomcat related processes.  This includes SOAP Web services, PDMExport or pdm_export, and any logins to the Tomcat web interface.

Recycling SDM Services after configuring the above debug logging will not stop the debug logging and debug content will continue to be written to jsrvr.log after a given SDM Services recycle.

For older versions of SDM, prior to 17.3 RU15, to turn on logging to collect Tomcat activity, run the following command from the SDM Server's Administrative Command Prompt:

Pdm_log4j_config -f SDM_WEB -l DEBUG -a -s 30MB

To shut off logging:

Pdm_log4j_config -f SDM_WEB -l INFO -a -s 3MB

 

Please review this link for REST Web Services logging/tracing

 

To check existing logging levels, please run:

pdm_log4j_config -f SDM_WEB -d

 

The above logging will not provide any meaningful content with regards to the export of a change calendar as it is a webengine operation and not an action done by the Tomcat Servlet.

For MILESTONE level logging, which exposes information on the web services calls that are being made, and includes some statistical data about the calls., please review Milestone SOAP Web services logging.  However, the logging details that are generated via the instructions in this KB Article (enabling the SDM_WEB settings) are not exposed as part of the logging configuration described here.  Both methods may be needed to obtain a fuller picture of the web services activity, depending on the situation.

As far as SOAP web services logging goes, the above setup will expose content primarily for AXIS based content, such as

XX.XX.XXXX 11:09:15.679[http-nio-8080-exec-5] DEBUG RPCProvider 135   value:  XXXX.ArrayOfString@fbc7b9b3 
XX.XX.XXXX 11:09:15.688[http-nio-8080-exec-5] DEBUG TIME 308 AxisServer.invoke2  preTr=0 tr=0 preInvoke=0 invoke=13 postInvoke=0

The above content is specific to AXIS based logging.  Equivalent CXF logging may be obtained through CXF Web Services Logging