A name for the property.
For names of the generic properties that come by default, see Generic Properties. You can select them from the drop-down list if you are adding the Property Mediator via Tooling as shown below.
The action to be performed for the property.
- Set: If this is selected, the property will be set in the message context.
- Remove: If this is selected, the property will be removed from the message context.
|Set Action As|
The possible values for this parameter are as follows:
The data type for the property. Property mediator will handle the property as a property of selected type. Available values are as follows.
String is the default type.
OM type is used to set xml property values on the message context. This is useful when the expression associated with the property mediator evaluates to an XML node during mediation. When the
OM type is used, the XML is converted to an AXIOM OMElement before it is assigned to a property.
|Value||If the Value option is selected for the Set Action As parameter, the property value should be entered as a constant in this parameter.|
If the Expression
option is selected for the Set Action As
parameter, the expression which determines the property value should be entered in this parameter. This expression can be an XPath expression or a JSONPath expression.
When specifying a JSONPath, use the format
json-eval(<JSON_PATH>), such as
json-eval(getQuote.request.symbol). In both XPath and JSONPath expressions, you can return the value of another property by calling
get-property(property-name). For example, you might create a property called
JSON_PATH of which the value is
json-eval(pizza.toppings), and then you could create another property called
JSON_PRINT of which the value is
get-property('JSON_PATH'), allowing you to use the value of the JSON_PATH property in the JSON_PRINT property. For more information on using JSON with the ESB, see JSON Support.
You can click NameSpaces to add namespaces if you are providing an expression. Then the Namespace Editor panel would appear where you can provide any number of namespace prefixes and URLs used in the XPath expression.
|Pattern||This parameter is used to enter a regular expression that will be evaluated against the value of the property or result of the XPath/JSON Path expression.|
|Group||The number (index) of the matching item evaluated using the regular expression entered in the Pattern parameter.|
The scope at which the property will be set or removed from. Possible values are as follows.
- Synapse: This is the default scope. The properties set in this scope last as long as the transaction (request-response) exists.
- Transport: The properties set in this scope will be considered transport headers. For example, if it is required to send an HTTP header named 'CustomHeader' with an outgoing request, you can use the property mediator configuration with this scope.
- Axis2: Properties set in this scope have a shorter life span than those set in the Synapse scope. They are mainly used for passing parameters to the underlying Axis2 engine
- axis2-client: This is similar to the Synapse scope. The difference between the two scopes is that the axis2-client scope can beaccessed inside the mediate() method of a mediator via a customs mediator created using the Class mediator. See axis2-client for further information.
- Operation: This scope is used to retrieve a property in the operation context level.
- Registry: This scope is used to retrieve properties within the registry .
- System: This scope is used to retrieve Java system properties.
See XPath Extension Functions for a detailed explanation of each scope.
You can use the following syntaxes to read properties or resources stored in the
conf Registries. When specifying the path to the resource, do not give the absolute path. Instead, use the
get-property('registry','gov:<path to resource from governance>@<propertyname>')
get-property('registry','conf:<path to resource from config>@<propertyname>')
get-property('registry','gov:<path to resource from governance>/@<proeprtyname>@<propertyname>')
get-property('registry','conf:<path to resource from config>/@<proeprtyname>@<propertyname>')
get-property('registry','gov:<path to resource from governance>')
get-property('registry','conf:<path to resource from config>')
Following is an example, in which you read a an XML file that is stored in the registry using XPath, to retrieve a value from it. Assume you have the following XML file stored in the Registry (i.e.,