Sun Identity Manager 8.1 System Administrator's Guide

To Enable Tracing for SPML 1.0

SPML 1.0 provides the following options for turning on trace output so you can log Identity Manager’s SPML traffic and diagnose problems.

Method 1: Enable the setTrace Method

You can use the setTrace method, provided by the SpmlClient and LighthouseClient classes, to enable tracing for SPML 1.0.

When you enable this setTrace method, the XML for the request sent by the client and the XML for the response received from the server are printed to the client console as they are sent and received.

The setTrace method takes a Boolean argument. For example:

SpmlClient client = new SpmlClient();

Method 2: Initializing the org.openspml.server.SOAPRouter Servlet

You can enable tracing when initializing the org.openspml.server.SOAPRouter servlet, which is a third-party, open source class from the OpenSPML organization. This servlet controls the output of RPC traffic information for the servlet handling SPML requests.

To enable this tracing method, add the following to the WEB-INF/web.xml file:

    <display-name>OpenSPML SOAP Router</display-name>
    <description>no description</description>

The following is sample output for an SPML 1.0 trace:

SpmlClient: sending to
<spml:addRequest xmlns:spml='urn:oasis:names:tc:SPML:1:0'
    <dsml:attr name='session'>

<dsml:value>session token</dsml:value>

  <spml:identifier type='urn:oasis:names:tc:SPML:1:0#GUID'>
    <dsml:attr name='objectclass'>
    <dsml:attr name='password'
    <dsml:attr name='gn'>
    <dsml:attr name='sn'>
    <dsml:attr name='email'>

SpmlClient: received
<?xml version='1.0' encoding='UTF-8'?>
<spml:addResponse xmlns:spml='urn:oasis:names:tc:SPML:1:0'
xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' result='urn:oasis:names:tc:
    <dsml:attr name='session'>
<dsml:value>session token</dsml:value>
  <spml:identifier type='urn:oasis:names:tc:SPML:1:0#GUID'>

Note –

For more information about the SOAP rpcrouter servlet, refer to your OpenSPML Toolkit documentation.

Method 3: Pass the trace Operational Attribute

You can enable tracing for an individual SPML RPC request by passing a trace operational attribute to the RPC request on the server side.

Tracing occurs during servlet initialization, and it controls how information is output for the RPC traffic of a servlet handling SPML Version 1.0 requests. For example, the trace prints the raw XML that is sent back and forth on whatever the System.out is for that servlet (which is a function of the Application container). For example:

AddRequest ar = new AddRequest();
 ar.setOperationalAttribute("trace", "true");

When you use the trace attribute, how the attribute affects server operation is vendor-specific. Currently, Identity Manager prints the raw request and response data to the server console, which is useful if the client application is not associated with a console window.

For more information consult your OpenSPML Toolkit product documentation.