Insert WSSE Timestamp Service

Syntax:

com.ibi.agents.XDInsertWSSETimestampAgent

Description:

This service is used to generate a WSSE Timestamp.

Parameters:

The following table lists and describes the parameters for the Insert WSSE Timestamp service.

Parameter Name

Description

XML Namespace Provider

Provider for the mapping between XML namespace prefix and namespace URI. If left blank, the XPath expression that is specified for the Timestamp Parent Element parameter cannot contain namespaces.

XPath Version

Determines which implementation of XPath should be used. You can select the iWay implementation of XPath, an external XPath implementation, or the default. The default option selects the XPath implementation that is specified in the General Settings area of the iSM Administration Console.

Create Parent Element

Determines whether the parent element is created if it is missing. Select true or false (default) from the drop-down list.

Timestamp Parent Element

Path to the element where the timestamp will be inserted. The default value is:

/soapenv:Envelope/soapenv:Header/wsse:Security

If the Create Parent Element parameter is set to true, then the expression must adhere to Restricted XPath syntax, otherwise the expression may adhere to the full syntax of the XPath engine selected by the XPath Version parameter.

Restricted XPath has the form /step1/step2/... where a step has the form ns:elem[predicate] or a pair of consecutive steps that has the form *[1]/self::ns:elem[predicate] to indicate the element must be the first child of its parent. The namespace prefixes are optional, but if present they must be declared in the XML Namespace provider. The predicate is optional, but when present it has the form [@ns1:attr1='val1' and @ns2:attr2='val2' and ...]. If no element matches the Restricted XPath expression and the Create Parent Element parameter is set to true, then the necessary elements and attributes will be created such that the expression would match successfully.

WSSE Timestamp Id

The value of the Timestamp ID attribute. Subsequent services can retrieve this value in the wsse_timestamp_id special register.

Expiration Period

The time period after which the timestamp will expire. If left blank, the timestamp will never expire.

Use the following format:

[xxh][xxm]xx[s]

For example, 1m30s is 90 seconds.

Edges:

The following table lists and describes the edges that are returned by the Insert WSSE Timestamp service.

Edge

Description

success

The WSSE Timestamp was successfully inserted.

fail_parse

An iFL or XPath expression could not be evaluated.

fail_operation

The WSSE Timestamp could not be inserted.

The Created time is always the current time. The Expires Time is the current time plus the given Expiration Period. If the Expiration Period is left blank, the Expires element will not appear and the timestamp will never expire. The location where to insert the timestamp is given by an XPath expression that is specified in the Timestamp Parent Element parameter. The XPath expression can contain namespace prefixes if the optional XML Namespace Map Provider is specified. When the Create Parent Element parameter is true, the parent element will be created if needed, but the XPath expression must adhere to the Restricted XPath syntax. When the Create parent Element parameter is false, the parent element must exist but the expression may adhere to the full syntax of the XPath engine selected by the XPath Version parameter. The optional WSSE Timestamp Id parameter will generate a wsu:Id attribute if specified. The Id is saved in the wsse_timestamp_id special register. This can be used to refer to the Timestamp in an XML Digital Signature Reference using the URL expression #_sreg(wsse_timestamp_id).

The following example shows the creation of an WSSE Timestamp with an expiration period of 90 seconds. The following table lists the parameter values that were used.

Parameter Names

Value

XML Namespace Provider

 

XPath Version

default

Create Parent Element

true

Timestamp Parent Element

 

WSSE Timestamp Id

mytimestampid

Expiration Period

1m30s

A sample input document is shown as follows (indented for display purposes only):

The resulting document shows the addition of the Timestamp in the SOAP header block (indented for display purposes only):


iWay Software