官术网_书友最值得收藏!

The property mediator

A property is a variable that stores some information during a time that depends on the scope it has configured.

Here's the syntax:

<property name="string" [action=set|remove] [type="string"] (value="literal" | expression="xpath") [scope=default|transport|axis2|axis2-client] [pattern="regex" [group="integer"]]>
    <xml-element/>?
</property>  

We have three different types of properties:

  1. Static: Get a static value in the creation:
<property name="color" value="red" />
  1. Dynamic: Get a dynamic value:
    • From an xpath expression:
<property name="dynamic1" expression="http://xpath"/>
    • From any other property:
<property name="dynamic2"
expression="get-property('dynamic1')"/>
  1. Action: Do an action with an existing property:
<property name="To" action="remove"/>  

The properties can have seven different types of scope:

  • Axis2: It's the shortest scope and is only used to send parameters to Axis2 engine
  • Axis2-client: The same duration as synapse, but the property can be read through custom mediators
  • Synapse: The property will live in the same sequence; it's the default scope
  • Operation: It's the largest scope; the property will live until the end of the service through the different sequences
  • Registry: It is used to get properties from the registry
  • System: To get Java system properties
  • Transport: The property will be sent as a transport header

Depending on the content, the properties can be of eight different types:

  • BOOLEAN
  • DOUBLE
  • FLOAT
  • INTEGER
  • LONG
  • OM
  • SHORT
  • STRING
主站蜘蛛池模板: 临猗县| 三亚市| 灵武市| 昌江| 和硕县| 泸水县| 屏山县| 高邮市| 湾仔区| 揭东县| 天长市| 白银市| 靖边县| 阿坝县| 宜兴市| 堆龙德庆县| 周至县| 康马县| 秦皇岛市| 台湾省| 景德镇市| 芒康县| 都昌县| 车险| 罗山县| 临澧县| 通海县| 镇沅| 土默特右旗| 钦州市| 汉阴县| 合水县| 建阳市| 铅山县| 溧阳市| 桦甸市| 安塞县| 黎平县| 会宁县| 长宁县| 长岛县|