Versions Compared

Key

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

...

Code Block
languagehtml/xml
titleGlobal Extension Sequence Example
<sequence xmlns="http://ws.apache.org/ns/synapse" name="WSO2AM--Ext--In">
    <log level="custom">
        <property name="TRACE" value="Global Mediation Extension"/>
    </log>
</sequence>

To test itthe code, copy this code it to an XML file (e.g., global_ext.xml) and save it the file in the <API_Gateway>/repository/deployment/server/synapse-configs/default/sequences directory. The above sequence prints a log message on the console on every API invocation.

...

Code Block
titleAPI Extension Sequence Example
<sequence xmlns="http://ws.apache.org/ns/synapse" name="admin--TwitterSearch:v1.0.0--In">
    <log level="custom">
        <property name="TRACE" value="API Mediation Extension"/>
    </log>
</sequence>

To see this at worktest the code, copy this content into it to an xml file (e.g., twittersearch_ext.xml) and save it the file in the <API_Gateway>/repository/deployment/server/synapse-configs/default/sequences directory if you are using a standalone server. If its tenant you need to copy it to tenants you are in a distributed client setup, copy the file to the tenant's synapse sequence folder (e. g For example, if tenant id is 1 then copy it to <API_Gateway>/repository/tenants/1/synapse-configs/default/sequences) folder

The above sequence prints a log message on the console whenever the TwitterSearch API is invoked.

...