- WSO2 Developer’s Guide
- Fidel Prieto Estrada Ramón Garrido Lázaro
- 180字
- 2021-07-08 10:05:59
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:
- Static: Get a static value in the creation:
<property name="color" value="red" />
- 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')"/>
- 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
推薦閱讀
- Vue.js 3.x快速入門
- 新編Visual Basic程序設計上機實驗教程
- Mastering Entity Framework Core 2.0
- ClickHouse性能之巔:從架構設計解讀性能之謎
- Learn to Create WordPress Themes by Building 5 Projects
- Machine Learning with R Cookbook(Second Edition)
- Apache Spark 2 for Beginners
- 微服務設計原理與架構
- Object-Oriented JavaScript(Second Edition)
- Python機器學習實戰
- Python數據挖掘與機器學習實戰
- QGIS By Example
- 利用Python進行數據分析(原書第3版)
- iOS開發實戰:從入門到上架App Store(第2版) (移動開發叢書)
- App Inventor 2 Essentials