Injector Service

Injector Service

Injector Service

With the XPath injector service you can either add a value to an existing XML element inside a MessagePart, or add this value as a new child element. You can also add an attribute to an existing node.


The value can be set using a Constant value or a Message Header. This service can be used to enrich XML data directly using XPath expressions.

In the table below, you will find an explanation of these properties. All attributes with a ‘*’ are mandatory.

Attribute

Description

Name*

By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this service to be enabled.

XPath Expression* XPath expression that will be executed to collect the target element. This expression must return a node, not a text.
Tag Name Name of the XML element to be created under the node that is collected by the XPath expression. If left empty, the value will be injected in the collected node instead. When Add Attribute is set to true, this will result in the creation of a new attribute on the parent node.
Add Attribute When set to true, injector will add an attribute using Tag Name as its name. The default is false.
Source Choose either CONSTANT or HEADER as a source for the injection. If you choose HEADER, you can add the Header Name, if you use CONSTANT, you can add the Constant Value. These fields appear dynamically.
Constant or Header Value Name of the constant or the name of the header from which the value is collected.
MessagePart-In

Here, you can specify the name of the MessagePart, which will be used as input.

The default value is msgprt0. Only use this when you are in fact using different names and/or MessageParts.

MessagePart-Out Here, you can specify the name of the MessagePart, which will be used as output for the service method. The default value is msgprt0.

Description

Description of the specific service. This is for documentation purposes.