Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section walks you through the steps you need to follow when writing a connector.

...

  1. To use the maven archetype to generate the Maven project template and sample connector code, run the following command in the directory where you want to create the connector on your local machine:

    Code Block
    mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.wso2.carbon.extension.archetype -DarchetypeArtifactId=org.wso2.carbon.extension.esb.connector-archetype -DarchetypeVersion=2.0.4 -DgroupId=org.wso2.carbon.esb.connector -DartifactId=org.wso2.carbon.esb.connector.helloworld -Dversion=1.0.0 -DarchetypeRepository=http://maven.wso2.org/nexus/content/repositories/wso2-public/

    Above is tested with Apache Maven 3.0.5.

    Note

    If maven version is 2.x.x, use the following command in the directory where you want to create the connector on your local machine:

    mvn archetype:generate -DarchetypeGroupId=org.wso2.carbon.extension.archetype -DarchetypeArtifactId=org.wso2.carbon.extension.esb.connector-archetype -DarchetypeVersion=2.0.4 -DgroupId=org.wso2.carbon.esb.connector -DartifactId=org.wso2.carbon.connector.helloworld -Dversion=1.0.0 -DarchetypeRepository=http://maven.wso2.org/nexus/content/repositories/wso2-public/

  2. When prompted, enter a name for the connector. Specify the name in upper camel case, such as HelloWorld. Type y to confirm.

...

PropertyDescription
name

The name of the component.

typeThe type of the Synapse component. These resources are Synapse templates, so the type is specified as synapse/template.
subComponents

Defines the operations in the component.

file

The name of the operation file with the extension.

description

A brief description about the functionality of the operation.

...