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 Endpint

You need to copy the built jar file to the MI_HOME/lib directory and restart the Micro Integrator to load the class.

Step 3: Adding the custom Inbound Endpoint

  1. If you have already created an ESB Config project, right-click the project 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 type.
  4. Enter a unique name for the inbound endpoint, and select an Inbound Endpoint Creation Type from the list.
  5. 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.
  6. Click Finish. The inbound endpoint is created in the src/main/synapse-config/inbound-endpoint folder under the ESB Config project you specified.
  7. 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