Monday, March 27, 2017

How to use the custom Synapse handler in WSO2 ESB

In this article, I'm going to explain how to use Synapse handler in WSO2 ESB
  1. Implement a Synapse handler. You can follow my previous blog to write a Synapse handler
  2. Build a JAR file (If use maven, you can run: mvn clean install)
  3. Edit the <ESB_HOME>/repository/conf/synapse-handlers.xml file as below
<handlers>
    <handler class="com.wso2.handler.sample.SampleMessageHandler" name="SampleMessageHandler">
</handler></handlers>

Start the ESB server

3 comments:

  1. Hello,

    Can you please mention how to use the synapse handler in the ESB APIs?

    How do you include these handlers in the APIs or proxy services?

    Thanks
    Kranthi

    ReplyDelete
    Replies
    1. Handlers are invoked seamlessly within the request/response flow of the ESB without any additional configurations. The following document [1] should provide you with more details.

      [1]. https://docs.wso2.com/display/ESB490/Writing+a+Synapse+Handler

      Delete
  2. This comment has been removed by the author.

    ReplyDelete