This documentation applies to older versions of WSO2 ESB connectors. To find the documentation relevant to the version you are using, select the connector from the WSO2 Connector Store and click Documentation.

All docs This doc

Versions Compared

Key

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

...

pom.xml
Contains the required dependencies for the connector core libraries, relevant Synapse libraries, and Maven repositories for a specific connector.
assembly
Contains files that are used at the connector build time. You do not need to modify these files.
src/main/java directoryContains any Java code for the connector.
src/main/resources directoryContains the configurations and definitions for the connector and its methods (referred to as operations). The config directory defines the initialization of the connector. You add additional directories for each category of operations (component) you want to create. In the Hello World sample, there is just one additional directory, sample, where the single operation for this sample connector is defined. However, in the ActiveCollab connector, for example, there are several component subdirectories such as activecollab-people and activecollab-projects, which contain the operations relevant to working with people and projects, respectively.
component.xml Defines the metadata for the operations in each component. You create a component.xml file in each subdirectory under src/main/resources.
sample-template.xmlDefines an operation. This is the actual API operation calling configuration including the Synapse template of the sequence. It contains the steps necessary to call the API that is exposed by the third party. For example, the ActiveCollab connector has createClient.xml and listCompanies.xml in the activecollab-people directory to define those two operations for working with people. Each operation of the API can be written in a manner similar to init.xml . If there is any Java code, the code should be included under src/main/java (e.g., the HelloWorldConnector.java file), and the relevant dependencies should be added to pom.xml.
init.xml Appears in the config directory under src/main/resources. This is mandatory for every connector and is used to initialize the connector environment. For example, if writing a Salesforce connector, include the login call here, and store the session token and API URL that are returned in the response as properties to use with other operations. For this sample, you do not need to change the file.
connector.xmlDefines the connector name and dependent modules (i.e., the metadata of the connector).
src/test directoryContains integration tests. This is required for integration tests for Java-based connectors. For more information, Perform integration tests below.

...