We have created a projection function which returns array of results.
Projection
function ListQuotes List<Structure(ListQuoteResponse)> {
parameter CompanyId Text;
parameter ContactPersonId Text;
parameter CustId Text;
parameter SalesStatus Text;
parameter PageSize Integer;
parameter PageNumber Integer;
}
PL/SQL
FUNCTION List_Quotes___ (
company_id_ IN VARCHAR2,
contact_person_id_ VARCHAR2,
cust_id_ VARCHAR2,
sales_status_ VARCHAR2,
page_size_ INTEGER,
page_number_ INTEGER) RETURN Proc_Core_Util_API.List_Quote_Response_Arr
IS
quote_request_ Proc_Core_Util_API.List_Quote_Request_Rec;
BEGIN
quote_request_.company_id := company_id_;
quote_request_.contact_person_id := contact_person_id_;
quote_request_.cust_id := cust_id_;
quote_request_.sales_status := sales_status_;
quote_request_.page_size := page_size_;
quote_request_.page_number := page_number_;
RETURN Proc_Core_Util_API.List_Quotes(quote_request_);
END List_Quotes___;
The select query returns results when I make a call.
select * from Proc_Service_SVC.Rd_List_Quotes('ABC01', '106738', '123UK', null, 10, 1, 'ab')
So as below returns results.
DECLARE
quote_request_ Proc_Core_Util_API.List_Quote_Request_Rec;
response_ Proc_Core_Util_API.List_Quote_Response_Arr;
temp_ varchar2(32000);
BEGIN
quote_request_.company_id := 'ABC01';
quote_request_.contact_person_id := '106738';
quote_request_.cust_id := '123UK';
quote_request_.sales_status := null;
quote_request_.page_size := 10;
quote_request_.page_number := 1;
response_ := Proc_Core_Util_API.List_Quotes(quote_request_);
dbms_output.put_line (response_.COUNT);
FOR i IN 1..response_.COUNT
LOOP
temp_ := response_(i).total_orders || ' ' || response_(i).quote_id || response_(i).return_code;
dbms_output.put_line (temp_);
END LOOP;
END;
However when we make a postman GET request we get no result.
https://{{baseurl}}/int/ifsapplications/projection/v1/ProcService.svc/ListQuotes(CompanyId='ABC01',ContactPersonId='106738',CustId='123UK',SalesStatus='',PageSize=10,PageNumber=1)
{
"value": ]
}
Any idea what could be causing this problem with the projection?