Sequences and Endpoints as Local Registry Entries

This sample demonstrates how sequences and endpoints can be fetched from a local registry.

Synapse configurations

Following are the integration artifacts that we can used to implement this scenario. See the instructions on how to build and run this example.

<proxy name="MainProxy" startOnLoad="true" transports="http https" xmlns="">
            <property name="direction" scope="default" type="STRING" value="incoming"/>
            <sequence key="stockquote"/>
<sequence name="stockquote" trace="disable" xmlns="">
    <!-- log the message using the custom log level. illustrates custom properties for log -->
    <log level="custom">
        <property name="Text" value="Sending quote request"/>
        <property expression="get-property('direction')" name="direction"/>
    <!-- send message to real endpoint referenced by key "simple" endpoint definition -->
        <endpoint key="simple"/>
<endpoint name="simple" xmlns="">
    <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>

Build and run

Create the artifacts:

  1. Set up WSO2 Integration Studio.
  2. Create an integration project with an ESB Configs module and an Composite Exporter.
  3. Create sequence stockquote and endpoint simple as local entries with the configurations given above.
  4. Also, create the proxy service MainProxy with the configuration given above.
  5. Deploy the artifacts in your Micro Integrator.

Set up the back-end service:

  1. Download the back-end service.
  2. Extract the downloaded zip file.
  3. Open a terminal, navigate to the axis2Server/bin/ directory inside the extracted folder.
  4. Execute the following command to start the axis2server with the SimpleStockQuote back-end service:


Send a message to invoke the service and analyze the mediation log on the Micro Integrator's start-up console.

You will see that the sequence and the endpoint are fetched from the local entry and that the property named direction (which was set by the proxy service) is logged by the sequence.

INFO {org.apache.synapse.mediators.builtin.LogMediator} - Text = Sending quote request, direction = incoming