search cancel

DMS API error: Failed to fetch SiteMinder registration scheme


Article ID: 214151


Updated On:


SITEMINDER CA Single Sign On Agents (SiteMinder) CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On Federation (SiteMinder)


When running DMS API code sample, it encounters error:

Agent API IsProtected................: SUCCESS
Realm Context Name...........: sample realm
Realm Context OID............: 06-29fc3caf-121f-xxxxxxxxxx-xxxxxxxxxxx
Failed to get DMS context[facility=4 severity=3 reason=0 reason=0 status=34 message=Failed to fetch SiteMinder registration scheme]

According to documentation:

Before retrieving the DMS context object information, you need to create a realm object to pass into the getDmsContext() call. The realm object must:
  • Have a valid object identifier (OID) obtained from an agent call to AgentAPI.isProtected().
  • Be configured with a registration scheme.


How do you configure a registration scheme for a realm?


The code sample expects "SiteMinder registration scheme" object is already exist, when missing, error will be thrown.

There are two ways to create "SiteMinder registration scheme" object:

1. Use PolicyApi, please see from SDK javapolicyapi kit.

2. Use XPSExplorer command line tool to manually create the required object. 


Release : 12.8.03



Create "SiteMinder registration scheme" object first, before running DMS API code sample
Option 1:
SDK sample provides an example:
It is in from SDK kit.
 private SmApiResult
    createRegScheme(SmPolicyApi policyapi)
        throws SmApiException
        SmUserDirectory userdir = new SmUserDirectory();
        policyapi.getUserDirectory(OBJNAME_PREFIX + "userdir", userdir);

        SmSelfReg regscheme = new SmSelfReg();
        regscheme.setName(OBJNAME_PREFIX + "regscheme");
        regscheme.setDescription(SAMPLE_DESC + "regscheme");

        return policyapi.addSelfReg(regscheme);
Option 2:
The same self registration scheme can be created via XPSExplorer tool as well.
Sample realm object doesn't have a SelfReg.
First create a selfreg object as below and then map it to the realm.
1) Run XPSExplorer
2) Look for SelfReg object. It is normally at #152.
4) Then type N for creating new object
5) Update the mandatory parameters Name (03), UserDirectoryLink(06). Leave other parameters as default.
Look for the needed UserDirectory and map it.
Give the corresponding number #3
Validate "v" and Update "U" then Q
6) Now update the Realm with the above created SelfReg
7) Go to desired realm
Make a Writable copy by typing "W"
Enter the number for SelfRegLink item number which is "20"
Select the needed selfreg object that we configured above.
Validate "v" and Update "U", then Q multiple times to go to the home screen. Then P.
Quit from XPSExplorer