Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

A connector is a collection of templates that define operations that call the APIs of a Cloud-based service like Twitter and JIRA. There users can call from their ESB configurations to easily access specific logic for processing messages. Typically, connectors are used to wrap the API of an external service. For example, there are several default connectors provided with the ESB , but you that call the APIs of services like Twitter and JIRA. You can also create your own connector to provide access to other services. Creating a connector involves the following high-level tasks:

  1. Research the APIs provided by the service for which you want to create a connector.
  2. Decide which API you are going to use to write the connector. For example, JIRA provides a REST API and Java API. If you choose the REST API, you can create your connector and operations entirely from XML configuration files. If you choose a Java API, you create XML configuration files that define your connector and point to your Java classes that define the operations.
  3. Use the connector core in WSO2 ESB libraries to write your connector. 
  4. After you create the files, you package them in a ZIP file, which you can then add to an ESB instance.

...

  • connector.xml - Defines the connector name, package, and the different categories of operations that will be exposed for the connector. For example, the JIRA connector's connector.xml file looks like this:

    Code Block
    languagehtml/xml
    <connector>
        <component name="jira" package="org.wso2.carbon.connectors">
            <dependency component="jira_config" />
            <dependency component="jira_dashboard"/>
            <dependency component="jira_filter"/>
            <dependency component="jira_group"/>
            <dependency component="jira_issue" />
            <dependency component="jira_project" />
            <dependency component="jira_search" />
            <dependency component="jira_user" />
            <description>JIRA 6.0 cloud connector</description>
        </component>
    </connector>

    For each of the categories you specify, you create a corresponding directory (as shown above in the directory tree), each of which contains a component.xml file.

...