1 Reply Latest reply on Nov 25, 2015 9:20 AM by Olafur T

    How to force mixed case object names in REST GET SQL service

    Olafur T

      Hi,

      ORDS version: 3.0.1.177.18.02

      Apex version: 5.0.1.00.06

      DB version: 12.1.0.2

      Glassfish 4.1 Community edition

       

      I am trying to create a web service using method= GET  and source type= query  using object names with mixed case.  The web service is forcing my object names into lowercase.

       

      I know I can fix the web service by changing the source type to PL/SQL by hand and manually create it using htp.prn,  mixed case works when I do that.

       

      But this is a huge SQL except for the forced lower-case, works as required.

       

      Example

      Create a simple test web service, type GET, source type query.

      select sysdate as "currentDate" from dual
      
      

       

      The result will be

      {"currentdate":"2015-11-23T12:44:25Z"}

       

      and not the expected

      {"currentDate":"2015-11-23T12:44:25Z"}

       

      Is there any way to tell the engine to keep the case and not force lower case ?  apex_json is case sensitive, which makes this behavior weird.

       

      declare
         json   varchar2 (32767) := '{"firstName":"Olafur Tryggvason"}';
      begin
         apex_json.parse (json);
         dbms_output.put_line ('Mixed case: ' || apex_json.GET_VARCHAR2 ('firstName'));
         dbms_output.put_line ('Lowercase: ' || apex_json.GET_VARCHAR2 ('firstname'));
      end;
      
      

       

      Will output:

      PL/SQL block executed

      Mixed case: Olafur Tryggvason

      Lowercase:

       

      Regards

      Olafur,

       

      Message was edited by: Olafur T Added version information