Creating a Custom Inbound Endpoint

WSO2 Micro Integrator supports several inbound endpoints. However, there can be scenarios that require functionality not provided by the existing inbound endpoints. For example, you might need an inbound endpoint to connect to a certain back-end server or vendor specific protocol.

To support such scenarios, you can write your own custom inbound endpoint by extending the behavior for Listening, Polling, and Event-Based inbound endpoints.

Instructions

Step 1: Developing the custom Inbound Endpoint

Step 2: Deploying the Custom Inbound Endpoint

You need to copy the built jar file to the MI_HOME/lib directory and restart the Micro Integrator to load the class. To copy the jar file to the Embedded Micro Integrator, open the Embedded Micro Integrator Server Configuration Wizard by clicking on the () icon on the upper menu and add the jar to select libraries section.

Step 3: Adding the custom Inbound Endpoint

  1. If you have already created an Integration Project, right-click the ESB Config module and go to New → Inbound Endpoint to open the New Inbound Endpoint Artifact.
  2. Select Create a New Inbound Endpoint and click Next.
  3. Type a unique name for the inbound endpoint, and then select Custom as the Inbound Endpoint Creation Type.
  4. Specify the location where the artifact should be saved: Select an existing ESB Config project in your workspace, or click Create new Project and create a new project.
  5. Click Finish. The inbound endpoint is created in the src/main/synapse-config/inbound-endpoint folder under the ESB Config project you specified.
  6. Open the new artifact from the project explorer, go to the Source View, and update the following properties:

    Property Name

    Description

    class Name of the custom class you implemented in step 1.
    sequence Name of the sequence message that should be injected. Specify a valid sequence name.
    onError Name of the fault sequence that should be invoked in case of failure. Specify a valid sequence name.
    inbound.behavior Specify whether your custom endpoint is listening, polling, or event-based.
Top