Versions Compared

Key

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

Eventing is used to send notifications when a particular action is completed, such as when an operation with particular arguments is invoked or when a specific response is returned. Notifications are enabled in WSO2 DSS Enterprise Integrator (WSO2 EI) using input and output event triggers.

...

  1. In the sample, we define a specific topic for events to be published, and an email address is added as a subscription for that topic. In order to allow mails to be sent, we have to configure the mail sender in the client Axis2 configuration. A sample axis2.xml file for the client configuration is stored in <DSS<EI_HOME>/samples/data-services/resources/sample_axis2_client.xml. Use it to replace the <DSS<EI_HOME>/repository/conf/axis2/axis2_client.xml file. The axis2_client.xml file contains an already configured mail sender section and is ready to be used.
  2. Edit the data service by adding a valid email address: Here we use the XML Edit option to edit the dataservice. In the XML view, replace all occurences of "test@test.com" with your own email address and restart the server.

...

  1. Log in to the management console and select Upload under Data Service menu.
  2. Select the EventingSample.dbs file from the <DSS<EI_HOME>/samples/data-services/dbs/rdbms/ folder and click Upload
  3. If the file is deployed successfully, the Deployed Services window appears with the new data service listed. Alternatively, copy the file to the <DSS<EI_HOME>/repository/deployment/server/dataservices folder. It will be deployed instantly as hot deployment, which is enabled in Data Services Server WSO2 EI by default.

See Uploading a Created Data Service.

Running the Sample

The sample service can be run using the TryIt   toolTryIt tool, which is bundled with the WSO2 Data Services ServerEI, or a code-generated java client sample as discussed in the Data Services Clients section.

Follow the steps below to demonstrate this functionality using the TryIt tool:

...