{"action":"opened","issue":{"url":"https://api.github.com/repos/wso2/product-ei/issues/1924","repository_url":"https://api.github.com/repos/wso2/product-ei","labels_url":"https://api.github.com/repos/wso2/product-ei/issues/1924/labels{/name}","comments_url":"https://api.github.com/repos/wso2/product-ei/issues/1924/comments","events_url":"https://api.github.com/repos/wso2/product-ei/issues/1924/events","html_url":"https://github.com/wso2/product-ei/issues/1924","id":303056213,"number":1924,"title":"DSS response is not valid when retrieve Array which contains a refcursor","user":{"login":"madhawa-gunasekara","id":6748599,"avatar_url":"https://avatars2.githubusercontent.com/u/6748599?v=4","gravatar_id":"","url":"https://api.github.com/users/madhawa-gunasekara","html_url":"https://github.com/madhawa-gunasekara","followers_url":"https://api.github.com/users/madhawa-gunasekara/followers","following_url":"https://api.github.com/users/madhawa-gunasekara/following{/other_user}","gists_url":"https://api.github.com/users/madhawa-gunasekara/gists{/gist_id}","starred_url":"https://api.github.com/users/madhawa-gunasekara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhawa-gunasekara/subscriptions","organizations_url":"https://api.github.com/users/madhawa-gunasekara/orgs","repos_url":"https://api.github.com/users/madhawa-gunasekara/repos","events_url":"https://api.github.com/users/madhawa-gunasekara/events{/privacy}","received_events_url":"https://api.github.com/users/madhawa-gunasekara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T11:08:53Z","updated_at":"2018-03-07T11:08:53Z","closed_at":null,"author_association":"MEMBER","body":"**Description:**\r\nDSS response is not valid when retrieve Array which contains a refcursor\r\n\r\n**Suggested Labels:**\r\n<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->\r\n\r\n**Suggested Assignees:**\r\n<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->\r\n\r\n**Affected Product Version:**\r\n\r\n**OS, DB, other environment details and versions:**    \r\n\r\n**Steps to reproduce:**\r\nPSQL\r\ncreate or replace type EmpType as object(\r\nEMPNO NUMBER(4),\r\nENAME VARCHAR2(10),\r\nJOB VARCHAR2(9),\r\nMGR NUMBER(4),\r\nHIREDATE DATE,\r\nSAL NUMBER(7,2),\r\nCOMM NUMBER(7,2),\r\nDEPTNO NUMBER(2));\r\n\r\ncreate or replace type EmpTableType as table of EmpType;\r\n\r\ncreate or replace TYPE GetEmployeesObj force AS OBJECT\r\n(\r\nEmployees EmpTableType\r\n);\r\n\r\ncreate or replace TYPE GetEmployeesResp force AS table of GetEmployeesObj;\r\n\r\ncreate or replace package pkg_emp as\r\n\r\n/* TODO enter package declarations (types, exceptions, methods etc) here */\r\nPROCEDURE getEmployees(get_employees_resp OUT sys_refcursor);\r\nend pkg_emp;\r\n\r\ncreate or replace package body pkg_emp as\r\n\r\nprocedure getemployees(get_employees_resp out sys_refcursor) as\r\nl_emptabletype emptabletype := emptabletype();\r\n\r\nl_getemployeesresp getemployeesresp := getemployeesresp();\r\nbegin\r\nl_emptabletype.extend();\r\nl_emptabletype(1):= emptype(1,'JPV','CTO',1,null,1000,null,10);\r\n\r\nl_getemployeesresp.extend();\r\nl_getemployeesresp(1) := getemployeesobj(l_emptabletype);\r\n\r\nOPEN get_employees_resp FOR SELECT * FROM TABLE (l_getemployeesresp);\r\nend getemployees;\r\n\r\nend pkg_emp;\r\n\r\nDSS:\r\n<data name=\"GetEmployees\" transports=\"http https local\">\r\n<config enableOData=\"false\" id=\"vtx\">\r\n<property name=\"carbon_datasource_name\">VATROX</property>\r\n</config>\r\n<query id=\"getEmployees\" useConfig=\"vtx\">\r\n<sql>call pkg_emp.getemployees(:get_emp_resp)</sql>\r\n<result element=\"Entries\">\r\n<element name=\"Employees\">\r\n<element arrayName=\"Employees\" name=\"Employee\" namespace=\"\">\r\n<element column=\"Employees[0]\" name=\"EMPNO\" optional=\"true\" xsdType=\"xs:string\"/>\r\n<element column=\"Employees[1]\" name=\"ENAME\" optional=\"true\" xsdType=\"xs:string\"/>\r\n<element column=\"Employees[2]\" name=\"JOB\" optional=\"true\" xsdType=\"xs:string\"/>\r\n<element column=\"Employees[3]\" name=\"MGR\" optional=\"true\" xsdType=\"xs:string\"/>\r\n<element column=\"Employees[4]\" name=\"HIREDATE\" optional=\"true\" xsdType=\"xs:date\"/>\r\n<element column=\"Employees[5]\" name=\"SAL\" optional=\"true\" xsdType=\"xs:string\"/>\r\n<element column=\"Employees[6]\" name=\"COMM\" optional=\"true\" xsdType=\"xs:string\"/>\r\n<element column=\"Employees[7]\" name=\"DEPTNO\" optional=\"true\" xsdType=\"xs:string\"/>\r\n</element>\r\n</element>\r\n</result>\r\n<param name=\"get_emp_resp\" sqlType=\"ORACLE_REF_CURSOR\" type=\"OUT\"/>\r\n</query>\r\n<operation name=\"getEmployees\">\r\n<call-query href=\"getEmployees\"/>\r\n</operation>\r\n</data>\r\n\r\nTry it:\r\n<Entries xmlns=\"http://ws.wso2.org/dataservice\">\r\n<Employees>\r\n<Employee>\r\n<EMPNO>1</EMPNO>\r\n<ENAME>JPV</ENAME>\r\n<JOB>CTO</JOB>\r\n<MGR>1</MGR>\r\n<HIREDATE>null</HIREDATE>\r\n<SAL>1000</SAL>\r\n<COMM>null</COMM>\r\n<DEPTNO>10</DEPTNO>\r\n</Employee>\r\n</Employees>\r\n</Entries>\r\n\r\n**Related Issues:**\r\n<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->"}}
{"actor":{"display_login":"madhawa-gunasekara"}}