This is the latest release in the 6.x.x family. For EI 7.0.0, click here.

All docs This doc

Versions Compared


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


Objective: Demonstrate simple database write operations with the DBReport mediator.

Code Block
<definitions xmlns="">

    <sequence name="main">
                    <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>

            <log level="custom">
                <property name="text"
                          value="** Reporting to the Database **"/>
            <dbreport xmlns="">
                    <sql>update company set price=? where name =?</sql>
                    <parameter expression="//m0:return/m1:last/child::text()"
                               xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd" type="DOUBLE"/>
                    <parameter expression="//m0:return/m1:symbol/child::text()"
                               xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd" type="VARCHAR"/>



  • Create the above configuration and deploy it in the WSO2 EI profile, see Working with WSO2 Integration Studio.
  • 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.