This example demonstrates how default values specified in the .dbs file of the data service will be used when specific values are not given for some fields. In the RDBMS Sample service, a default employee salary is specified as 1500 in the .dbs file as shown below.
...
- employeeNumber=6002;
- lastName=Smith;
- firstName=John;
- email=john@smith.com
- Remove
<xs:salary xmlns:xs="
http://ws.wso2.org/dataservice/samples/rdbms_sample
"></xs:salary>
from the operation to make sure that a salary value is not added.
Now, when you execute the "addEmployee" operation, the result will be the following:
...