Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation :
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
Objective: Demonstrate simple database write operations with the DBReport mediator.
- Start the Synapse configuration numbered 361: i.e. wso2esb-samples -sn 361
- Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
The dbreport mediator writes (inserts one row) to a table using the message details. It works the same as the DBLookup mediator. In this sample, the DBReport mediator is used for updating the stock price of the company using the last quote value, which is calculated by evaluating an XPath against the response message. After running this sample, user can check the company table using the Derby client tool. It will show the value inserted by the DBReport mediator.
Run the client using the following command:
and then execute the following query using the database client tool against synapsedb.
It will show some value as follows.