Sun Java System Access Manager 7 2005Q4 C API Reference

am_notify()

Parses and processes an SSO or policy notification message as an XML string. If the message is an SSO notification, any SSO Token listeners registered using am_sso_add_listener() will be called. If the notification message is a policy notification, the internal policy cache maintained by the policy module in the C SDK will be updated with the notification information if the policy module in the C SDK has been initialized (using am_policy_init() and am_policy_service_init() ).

Syntax

#include "am_notify.h"
AM_EXPORT am_status_t
am_notify(const char *xmlmsg, am_policy_t policy_handle);

Parameters

This function takes the following parameters:

Parameter

Description

xmlmsg

XML message containing the notification message.

policy_handle_t

The policy handle created from am_policy_service_init(). NULL if policy is not initialized or not used.

Returns

This function returns am_status_t with one of the following values:

Value

Description

AM_SUCCESS

If XML message was successfully parsed and processed.

AM_INVALID_ARGUMENT

If any input parameter is invalid.

AM_ERROR_PARSING_XML

If there was an error parsing the XML message.

AM_ERROR_DISPATCH_LISTENER

If there was an error dispatching the listener(s).

AM_FAILURE

If any other error occurred.

Details

This function should be called by the service listening on the notification URL given in the properties file if notification is enabled.