Open jayasithu opened 2 years ago
This issue is NOT closed with a proper Resolution/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Resolution/Cannot Reproduce - Issue cannot be reproduced.
- Resolution/Duplicate - Issue is already reported before.
- Resolution/Fixed - Issue has already been fixed.
- Resolution/Answered - Issue has already been answered.
- Resolution/Invalid - Issue is invalid.
- Resolution/Not a bug - Issue is not a bug.
- Resolution/Postponed - Issue is postponed.
- Resolution/Won’t Fix - Issue won't be fixed.
This issue is NOT closed with a proper Resolution/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Resolution/Cannot Reproduce - Issue cannot be reproduced.
- Resolution/Duplicate - Issue is already reported before.
- Resolution/Fixed - Issue has already been fixed.
- Resolution/Answered - Issue has already been answered.
- Resolution/Invalid - Issue is invalid.
- Resolution/Not a bug - Issue is not a bug.
- Resolution/Postponed - Issue is postponed.
- Resolution/Won’t Fix - Issue won't be fixed.
This issue is NOT closed with a proper Resolution/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Resolution/Cannot Reproduce - Issue cannot be reproduced.
- Resolution/Duplicate - Issue is already reported before.
- Resolution/Fixed - Issue has already been fixed.
- Resolution/Answered - Issue has already been answered.
- Resolution/Invalid - Issue is invalid.
- Resolution/Not a bug - Issue is not a bug.
- Resolution/Postponed - Issue is postponed.
- Resolution/Won’t Fix - Issue won't be fixed.
This issue is NOT closed with a proper Resolution/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Resolution/Cannot Reproduce - Issue cannot be reproduced.
- Resolution/Duplicate - Issue is already reported before.
- Resolution/Fixed - Issue has already been fixed.
- Resolution/Answered - Issue has already been answered.
- Resolution/Invalid - Issue is invalid.
- Resolution/Not a bug - Issue is not a bug.
- Resolution/Postponed - Issue is postponed.
- Resolution/Won’t Fix - Issue won't be fixed.
This issue is NOT closed with a proper Resolution/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Resolution/Cannot Reproduce - Issue cannot be reproduced.
- Resolution/Duplicate - Issue is already reported before.
- Resolution/Fixed - Issue has already been fixed.
- Resolution/Answered - Issue has already been answered.
- Resolution/Invalid - Issue is invalid.
- Resolution/Not a bug - Issue is not a bug.
- Resolution/Postponed - Issue is postponed.
- Resolution/Won’t Fix - Issue won't be fixed.
This issue is NOT closed with a proper Resolution/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Resolution/Cannot Reproduce - Issue cannot be reproduced.
- Resolution/Duplicate - Issue is already reported before.
- Resolution/Fixed - Issue has already been fixed.
- Resolution/Answered - Issue has already been answered.
- Resolution/Invalid - Issue is invalid.
- Resolution/Not a bug - Issue is not a bug.
- Resolution/Postponed - Issue is postponed.
- Resolution/Won’t Fix - Issue won't be fixed.
Description
Unable to pass a null value to a DATE column using a dataservice in WSO2 Micro Integrator 1.2.0. We tested this with the sample provided in documentation[1] and tested out this scenario in an Oracle 11g database and MySQL database and we were able to observe an error when passing a NULL to a date column via the dataservice.
following is the dataservice that was used to test the scenario,
Following is the datasource that was used to connect to the MySQL and Oracle database
MySQL
And this is the sample payload.xml that was used to Insert the data into the database,
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' --data "@employee-payload.xml" http://localhost:8290/services/RDBMSDataService/employee
Scenario 01
With this setup at first a NULL value was passed to the payload.xml filw as the sample below and executed the curl command
Then we were able to observe the following errors
CURL Response:
[2022-06-16 17:44:33,725] INFO {LogMediator} - {proxy:dssCallMediatorInlineSingleRequestProxy} To: /services/dssCallMediatorInlineSingleRequestProxy, MessageID: urn:uuid:2114c169-cb05-4f35-8c48-5c8b0f62c628, correlation_id: 2114c169-cb05-4f35-8c48-5c8b0f62c628, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = DataService exception occurred while accessing the dataservice to do the operation, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope>
MI Log:
Scenario 2
Next we passed an empty string to the payload.xml file and executed the curl command. Then the following error was observed,
CURL Response:
MI Log:
The above tests was carried out in MI 1.2.0 latest updated pack and also we could see the same error for the DSS call mediator in Micro Integrator 4.0.0 as well. To test this in MI 4.0.0 documentation[2] was used to setup the project.
[1]https://ei.docs.wso2.com/en/7.2.0/micro-integrator/use-cases/examples/data_integration/rdbms-data-service/ [2]https://apim.docs.wso2.com/en/latest/reference/mediators/dss-mediator/
Steps to Reproduce
Please follow the steps given below to setup the test project and reproduce the issue. Please refer to documentation[1] for more information on how RDBMS data (stored in a MySQL database) can be exposed as a data service.
Setting up the database,
1.Create a database named Employees in MySQL.
CREATE DATABASE Employees;
Setting up the integration project.
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' --data "@employee-payload.xml" http://localhost:8290/services/RDBMSDataService/employee
Please follow documentation[1] since I used the example provided in the documentation to set this up. But the sample datasource provided in the documentation caused an error when having the datasource within the dataservice and that I why I created a seperate datasource and refered it from the dataservice.
Furthermore I have attached the entire project I used in Integration studio for your reference and the CAR file that was used to test in MySQL, please edit the datasource accordingly.
CAR File: OracleDBTestCompositeExporter_1.0.0-SNAPSHOT .car.zip Complete Project: OracleDBTest.zip
[1]https://ei.docs.wso2.com/en/7.2.0/micro-integrator/use-cases/examples/data_integration/rdbms-data-service/
Affected Component
MI
Version
1.2.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response