Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In addition to standard XPath functions, the ESB supports the following custom functions for working with XPath expressions:

...

The get-property() function allows any XPath expression used in a configuration to look up information from the current message context. Using property Using the Property mediator, you can retrieve properties previously set, and/or information from the Synapse, Axis2 message contexts or transport header.

...

If you provide only the property name without the scope, the default Synapse scope will be used.

Default Scope

Message context properties within the Synapse scope can be retrieved from the default scope. In addition to the user defined properties, following special properties can be retrieved from the default scope.

NameReturn Value
ToIncoming URL as a String or empty string («») if a To address is not defined.
FromFrom address as a String or empty string («») if a From address is not defined
ActionSOAP Addressing Action header value as a String or empty string («») if a Action is not defined
FaultToSOAP FautTo header value as a String or empty string («») if a FaultTo address is not defined
ReplyToReplyTo header value as a String or empty string («») if a ReplyTo address is not defined
MessageIDA unique identifier (UUID) for the message as a String or empty string («») if MessageID is not defined. This id is guaranteed to be unique.
FAULTTRUE if the message has a fault or empty string if message doesn't have a fault
MESSAGE_FORMATReturns pox, get, soap11, soap12 depending on the message. If a message type is unknown this returns soap12
OperationNameOperation name corresponding to the message. A proxy service with a WSDL can have different operations. If the WSDL is not defined ESB defines fixed operations
Axis2 scope

Message context properties within the Axis2 scope can be retrieved from the Axis2 scope. 

Syntax:
get-property('axis2', String propertyName)

Transport scope

Message context properties within the transport scope can be retrieved from the transport scope. 

Syntax:
get-property('transport', String propertyName)

Registry scope

Properties within the registry can be retrieved from the registry scope.

Syntax:
get-property('registry', String registryPath@propertyName)
get-property('registry', String registryPath)

System scope

Java System properties can be retrieved from the system scope.

Syntax:
get-property('system', String propertyName)

Note: system scope is only available in WSO2 ESB 4.8.0 or later versions