This documentation is for WSO2 Enterprise Service Bus version 5.0.0. For the latest ESB, view the latest WSO2 Enterprise Integrator documentation.

All docs This doc

Versions Compared

Key

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

...

Info

When the result of an XPath evaluation results in a single XML node, the evaluator will return the text content of this node by default (equivalent of doing /root/body/node/text()). If you want to retrieve the node itself, you can configure the Enrich mediator s as shown in the following example.

Code Block
languagexml
<inSequence>
<log level="custom">
<property name="WHERE" value="before doing stuff"/>
</log>
<enrich>
<source type="body" clone="true"/>
<target type="property" property="ENRICH_PROPERTY"/>
</enrich>
<property name="PROPERTY_PROPERTY"
expression="$body/child::node()"
scope="default"/>
<log level="custom">
<property name="WHERE" value="before doing stuff"/>
<property name="ENRICH_PROPERTY" expression="get-property('ENRICH_PROPERTY')"/>
<property name="PROPERTY_PROPERTY" expression="get-property('PROPERTY_PROPERTY')"/>
</log>
<enrich>
<source type="property" clone="true" property="ENRICH_PROPERTY"/>
<target type="body" action="sibling"/>
</enrich>
<log level="full"/>
</inSequence>

...

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

operation scope

You can retrieve a property in the operation context level from the operation scope. The properties within iterated/cloned message with the operation scope are preserved in the in sequence even if you have configured your API resources to be sent through the fault sequence when faults exist. A given property with the operation scope only exists in a single request and can be accessed by a single resource. The properties in this scope are passed to the error handler when the FORCE_ERROR_ON_SOAP_FAULT property is set to true. See FORCE_ERROR_ON_SOAP_FAULT section in Generic Properties for more information.

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

url-encode() function

The url-encode function returns the URL-encoded value of the specified string.

...

  • url-encode(string value)
  • url-encode(string value, string charset)

...


Next, see Synapse XPath Variables.

...