IBM Support

Enabling a Client Trace for a Web Services Client

Troubleshooting


Problem

This document details the ways a client trace can be enabled for Web Services.

Resolving The Problem

This document details the ways a client trace can be enabled for Web Services.

Full details can be found in the Web Services Client for ILE Programming Guide

There are two ways to enable a Web Services Client Trace:

1. Add directives to axiscpp.conf file

The client engine looks for the configuration file etc/axiscpp.conf. By default, if the AXISCPP_DEPLOY environment variable is not set to the directory containing the etc directory, the default AXISCPP_DEPLOY path is /qibm/proddata/os/webservices/v1/client. It is recommended that if you are going to set properties in the property file, copy the /qibm/proddata/os/webservices/v1/client/etc directory to your own directory because any changes to the /qibm/proddata/os/webservices/v1/client/etc/axiscpp.conf will be lost when IWS PTFs are loaded.

To enable tracing, set the ClientLogPath property to a path for the log file (if it does not exist, one will be created). In addition, the LogFilter property can be set to filter the trace records so you can isolate a component. The filter is a semicolon delimited string of possible filters. Possible filters include the following:

o stub - show trace records generated by stubs
o engine - show trace records generated by engine
o parser - show trace records generated by parser
o transport - show trace records generated by transport
o noEntryExit - do not show entry/exit trace records

The default filter is stub;engine;parser;transport.

If you wanted to enable a client trace and only show transport trace records and no entry/exit trace records, the following would be specified in the axiscpp.conf file:

ClientLogPath:/tmp/axis.log
   LogFilter:transport;noEntryExit;

2. Programmatically via the start trace API

From C++, you can do so using the following static methods on the Axis class (defined in the Axis.hpp header file):

static int startTrace(const char* logFilePath,  const char *logFilter=NULL);
   static void stopTrace();
   static void writeTrace(AXIS_TRACE_TYPE type,  const char* functionName,  const char * fmt, ...);

To start a trace in C++:

Axis::startTrace("/tmp/axis.log", "transport;noEntryExit");

From within C (prototypes in Axis.h header file):

int axiscAxisStartTrace(const char* logFilePath, const char *logFilter);
   void axiscAxisStopTrace();
   void  axiscAxisWriteTrace(AXISC_TRACE_TYPE type,  const char* functionName,  const char * fmt, ...);

To start a trace in C:

 axiscAxisStartTrace("/tmp/axis.log", "transport;noEntryExit");

To start a trace in RPGLE:

 axiscAxisStartTrace('/tmp/axistransport.log' : *NULL);

See the header files for more information (header files are in /qibm/proddata/os/webservices/v1/client/include/axis).

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Historical Number

531849836

Document Information

Modified date:
31 January 2024

UID

nas8N1012813