Creating Endpoint Templates

Follow the instructions given below to create a new Endpoint Template in WSO2 Integration Studio.

Instructions

Creating the Endpoint Template artifact

  1. Right-click the ESB Config project and go to New → Template to open the New Template Artifact dialog box.

  2. Select Create a New Template and click Next.

  3. Enter a unique name for the template and select one of the following Endpoint Template types.

    • Address Endpoint Template
    • Default Endpoint Template
    • HTTP Endpoint Template
    • WSDL Endpoint Template

    Specify values for the required parameter for the selected endpoint type.

  4. Do one of the following to save the artifact:

    • To save the template in an existing ESB Config project in your workspace, click Browse and select that project.
    • To save the template in a new ESB Config project, click Create new Project and create the new project.
  5. Click Finish

    The template is created in the src/main/synapse-config/templates folder under the ESB Config project you specified.

  6. To use the endpoint template, update the properties.

Updating properties

  1. Open the template artifact from the project explorer.
  2. First, update the endpoint parameter values with placeholders that are prefixed by $.

    For example:

  3. Then, click Add Template Parameter to open the Parameter Configuration dialog box and add the endpoint parameter placeholders (that you used above) as parameters:

Designing the integration

When you have an Endpoint template defined, you can use a Template Endpoint in your mediation sequence to call the parameters in the template.

  1. Open to the Design View of your mediation sequence.
  2. Drag the Call Mediator from the Palette and drop it to the relevant position in the mediation sequence.

    Tip

    Similarly, you can use the Send Mediator.

  3. Drag a Template Endpoint from the Endpoints section in the Palette and drop it to the empty box in the Call Mediator.

  4. Open the Template Endpoint from the project explorer and click Add Parameters to open the Template Endpoint Parameter Configuration dialog box.

  5. Specify the parameter values as shown below.

Examples

Top