PhenixID

Add Session Objects from XML

Add Session Objects from XML

Version: 1.2

Category: Input

Extended Category: XML

Action Package: Standard Actions

Description

Creates new Session Objects from an XML file. Either the new objects can be added to the existing objects, or the existing objects can be replaced by the ones from XML. The action can also be used as an Action Data Source, to be used as the initial data in a Policy.

Each element in the XML file that should be added as a Session Attribute must be defined using XPath.

Parameter

Description

Example

XML File

The XML file path.

c:\xmlfiles\file.xml

XML root node for Session Object

XPath to the element that should be considered top element for the Session Object.

This parameter can also be used to filter out the wanted nodes, if all nodes not are needed.

/user

/system/user[title = “Administrator”]

XPath for Session Object Name

XPath to the value that should be used as Session Object Name. This XPath must be relative to the root element for the Session Object.

./id

XML attribute mapping

Comma separated list of XPath to XML element paired with name of Session Attribute. This XPath must be relative to the root element for the Session Object.

/@name|fullname,/phone|phone

Keep existing Session Objects

If any existing Session Objects should be kept (true) or removed (false). Default value = true.

false

Use Cases

Example 1: Create user objects

This action will create Session Objects for each user in the xml-file below. It will also create Session Attributes for the attributes ‘name’ and ‘id’ and the elements ‘telephone’ and ‘title’. The attribute ‘id’ will be used as Session Object name. Any existing Session Objects in the Policy will be replaced with the ones from the xml-file.

XML-file:

<system>
 <user id='abc123' name='John Smith'>
  <title>Administrator</title>
  <telephone>
   <value>012-345678</value>
   <value>012-987543</value>
  </telephone>
 </user>
 <user id='def456' name='Jane Smith'>
  <title>Engineer</title>
  <telephone>
   <value>014-546379</value>
   <value>014-634050</value>
  </telephone>
 </user>
</system>

Action configuration:

Parameter

Value

XML File

c:\xmlfiles\file.xml

XML root node for Session Object

/system/user

XPath for Session Object Name

./@id

XML attribute mapping

./@id|uid,./@name|name,./telephone/value|telephonenumber,./title|title

Keep existing Session Objects

false

After the action has run the following Session Objects will exist in the Policy:

Session Object with Session Object Name ‘abc123’

uid

abc123

name

John Smith

telephoneNumber

012-345678
012-987543

title

Administrator

Session Object with Session Object Name ‘def456’

uid

def456

name

Jane Smith

telephoneNumber

014-546379
014-634050

title

Engineer


DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se