3 Replies Latest reply: Dec 15, 2012 6:57 AM by Prabodh RSS

    RESTFul webservice does not return all fields defined in query

    user11109786
      Hello,

      I get a restful webservice defined and it return results when I click test button. But in the result returned, it only has two fields but not all fields I defined.

      Any Ideas?

      Version: 4.2
      query:
      select service_overview_his_id,
      a.service_id, b.service_name,
      cyear || '-' || cmonth month,
      enviorment,
      num,
      availability_percent,
      total_gb,
      used_gb,
      create_user_id,
      create_time
      from dbmon_service_overview_his a inner join dbmon_service_avil b on(a.service_id = b.service_id)
      where (cyear || '-' || cmonth) = :c_month

      test result:
      {"next":{"$ref":"http://xxxx:7777/apex/dbmonitor/dba/report/overviewdba/report/overview/2012-11?page=1"},"items":[{"service_overview_his_id":19,"service_id":1},{"service_overview_his_id":20,"service_id":1},{"service_overview_his_id":21,"service_id":2},{"service_overview_his_id":22,"service_id":2},{"service_overview_his_id":23,"service_id":3}]}



      Thanks,

      Robin
        • 1. Re: RESTFul webservice does not return all fields defined in query
          979321
          Hi there, did you get this issue when using apex.oracle.com's free workspace or on a separate stand-alone installation with Oracle DB standard edition? I too have noticed this and it effectively puts a full stop to any development on my part with APEX since I cannot expose useful web services this way unfortunately :( I'm not sure if this is a limitation of the online demo version of apex.oracle.com since if it is present in the main APEX installation, it is quite a bad restriction. As for a workaround, I'm looking at trying to send the different fields' values merged into a single collection object separated with some delimiter perhaps so you get a JSON object with items containing collections.
          • 2. Re: RESTFul webservice does not return all fields defined in query
            user11109786
            Mine is individual full install of APEX 4.2 on UNIX
            • 3. Re: RESTFul webservice does not return all fields defined in query
              Prabodh
              Hi user11109786
              I get a restful webservice defined and it return results when I click test button. But in the result returned, it only has two fields but not all fields I defined.
              Any Ideas?

              Version: 4.2
              query:
              select service_overview_his_id,
              a.service_id, b.service_name,
              cyear || '-' || cmonth month,
              enviorment,
              num,
              availability_percent,
              total_gb,
              used_gb,
              create_user_id,
              create_time
              from dbmon_service_overview_his a inner join dbmon_service_avil b on(a.service_id = b.service_id)
              where (cyear || '-' || cmonth) = :c_month

              test result:
              {"next":{"$ref":"http://xxxx:7777/apex/dbmonitor/dba/report/overviewdba/report/overview/2012-11?page=1"},"items":[{"service_overview_his_id":19,"service_id":1},{"service_overview_his_id":20,"service_id":1},{"service_overview_his_id":21,"service_id":2},{"service_overview_his_id":22,"service_id":2},{"service_overview_his_id":23,"service_id":3}]}

              >
              The RESTful services are part of Apexlistener. Please post
              <ul>
              <li>ApexListener version</li>
              <li>JEE Container used / Standalone</li>
              <li>Request type</li>
              </ul>

              As far as I can see both ApexListner 1.1.4 and 2.0 EA, both on Glassfish, are working fine for me. I get well formed and all columns in the query for my RESTful services.

              Cheers,