The Bean Mediator is used to manipulate a JavaBean that is bound to the Synapse message context as a property. Classes of objects manipulated by this mediator need to follow the JavaBeans specification.
The Bean mediator is a content-aware mediator.
The parameters available to configure the Bean mediator are as follows.
|Class||The class on which the action selected for the Action parameter is performed by the Beanstalks manager.|
|Action||The action to be carried out by the Bean mediator. The possible values are:|
|Var||The variable which is created, removed, set or retrieved for the JavaBean based on the value selected for the Action parameter.|
|Property||The name of the property used to bind the JavaBean to the Synapse client.|
The value of the property used to bind the JavaBean to the Synapse client. The property value can be entered using one of the following methods.
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.
The element of the message which should be affected by execution of the Bean mediator configuration. The target element can be specified using one of the following methods.
You can configure the mediator using XML. Click switch to source view in the Mediator window.
In this example, the Bean mediator first creates a JavaBean with the
loc as the variable. The next Bean mediator creates property named
latitude within the
loc variable using the
SET_PROPERTY action. The third Bean mediator creates another property named
longitude in the same variable using the