This documentation is for WSO2 Data Services Server 3.2.2. View documentation for the latest release.
Page Comparison - Validators Sample (v.6 vs v.7) - Data Services Server 3.2.2 - WSO2 Documentation

Versions Compared

Key

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

...

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

  1. Ensure that the RDBMSSampleService is deployed as described in Samples Setup.
  2. Log in to the management console of your server and click List under Services in the navigator. The RDBMSSampleService will be listed here.
  3. Click Try this service to open the TryIt tool.
  4. Select the "addEmployee" operation and enter the following parameter values to the request:
    • employeeNumber: 6001
    • lastName: AB
    • firstName: Nick 
    • email: test@test.com
    • salary: 1500
  5. Click Send to execute the operation. Note that you are not getting any results. A validation error will show as the response because the "addEmployee" operation has failed. This is because the lastName only has 2 characters.
  6. Now, change the lastName and the email address in the request as shown below and execute the operation again.
    • employeeNumber: 6001
    • lastName: ABC
    • firstName: Nick 
    • email: test-test.com
    • salary: 1500
    Note that the operation will fail again because the email address is invalid.
  7. Next, execute the "addEmployee" operation again with parameter values for email address and lastName as shown below:
    • employeeNumber: 6001
    • lastName: ABC 
    • firstName: Nick 
    • email: test@test.com 
    • salary: 1500.

      Note that the entry will be successfully added and you will get a result.