This discussion is archived
4 Replies Latest reply: Jun 17, 2013 8:24 AM by user9305659 RSS

ApEx Listener 2.0, non-ApEx application

jflack Oracle ACE
Currently Being Moderated
I've been successfully using the ApEx Listener 1.1.4 to reach my non-ApEx Web PL/SQL (OWA) applications.

So I decided to try the new ApEx Listener 2.0 EA2 with this - I was especially interested in multiple database capability, so I only have to deploy one copy of ApEx Listener.

2.0 is lousy for non-ApEx. For one thing, you CAN'T use SQL Developer to administer the thing without having it pointing at an ApEx WITH restful services - it even seems to expect ApEx 4.2. But there are no web-based configuration screens anymore, so the only other way to configure it is to do "java -jar apex.war +subcommand+". That assumes that you have command line privileges on the server that is hosting your ApEx Listener. I can get this, but WHY should I need to?

Please Oracle, re-think the administration of this version of the listener before you go to production. I don't want to run ApEx, I don't really want to unlock APEX_PUBLIC_USER, or create the APEX_LISTENER or APEX_REST_PUBLIC_USER accounts, or update my ApEx (that I don't use) to 4.2. I just want a replacement for mod_plsql, so I can run everything on WebLogic instead of old OAS.
  • 1. Re: ApEx Listener 2.0, non-ApEx application
    906844 Newbie
    Currently Being Moderated
    Hi jflack,

    Thank you for this post. I'm a complete newbie to a lot of this, so apologies for the naive questions. But I somehow got the impression that there was a 'PL/SQL Gateway specification' somewhere, and that mod_plsql, EPG, and APEX Listener were 'implementations' of the spec, in the traditional sense that those terms are used. But:

    1. I can't find any place on the Oracle website which lists "The PL/SQL Gateway Specification" independent of describing mod_plsql or another implementation. (this would be satisfying but not totally necessary it seems pretty well covered by "Understanding mod_plsql": http://docs.oracle.com/cd/B12037_01/server.101/b12303/concept.htm though I can't find such a page for the 11.2g version)

    2. If the Apex Listener 2.0 is indeed an implementation of the spec, then it certainly should NOT presuppose extra requirements besides those in "the spec" -- in particular, one should be able to connect to any schema specified in the DAD and use procedures in it, without relying on APEX packages, right? Based on the name, 'APEX listener' though, I guess that conformance to the 'spec' isn't really a guiding principle here? It's just that it makes use of the PL/SQL gateway spec for its own purposes, but is not meant to provide it for non-APEX use.

    3. Did you ever find a work-around that would allow using ApEx Listener 2.0 without using any of the other APEX stuff (APEX_PUBLIC_USER etc), in other words, to swap it in place of mod_plsql?

    4. Do you know of a working example of use of the APEX Listener 2.0 API within some java code that runs in Tomcat?

    5. JSON support in Oracle: In this article (http://www.amis.nl/theme/amis/uploadedFiles/whitepapers/Fusion%20Column%20-%20Putting%20your%20mind%20at%20REST.pdf ), the author states: "Support for REST and JSON is not currently widespread in the Oracle stack. But it is spreading like wildfire". I saw that the Apex Listener 2.0 Developer Guide (here: http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/apexlistenerdevguide1-1ea-177511.pdf) JSON is produced by the responses. But there is nothing in the APEX Listener 2.0 API that mentions JSON at all. So my question would be, if one wanted to produce JSON from Oracle and NOT use APEX packages, is there a way?

    Thanks very much!

    Henry
  • 2. Re: ApEx Listener 2.0, non-ApEx application
    Prabodh Guru
    Currently Being Moderated
    Hi Henry,
    Welcome to Oracle Forums!
    Please acquaint yourself with the FAQ and forum etiquette if you haven't already done so.

    It is better to post your query/queries as separate threads that you start.

    First of all I am not sure where you got this idea of a PL/SQL Gateway specification. Is there a link that you can share for this?
    EPG, OHS and ApexListener are three alternatives to achieve the same goal. See http://docs.oracle.com/cd/E37097_01/doc/install.42/e35123/overview.htm#CJAFEAJJ

    EPG , as the name suggests, is a bunch of packages DBMS_XDB,DBMS_EPG, etc. So in that sense there is an API to configure the EPG but you do not really use this api for anything other than configuring the EPG.
    OHS/mod_plsql and ApexListener do not have really have an API.

    RESTful support is a feature of Apex enabled through ApexListener , and not through EPG. The best RESTful support is in ApexListener. You will find some starting information in Using RESTful Services.

    Cheers,
  • 3. Re: ApEx Listener 2.0, non-ApEx application
    jflack Oracle ACE
    Currently Being Moderated
    Actually, while some of Henry's questions are answered elsewhere in the forum, and some are not really apropos to my original complaint, others are relevant.

    1. There really isn't a PL/SQL Gateway specification per se, but all PL/SQL web applications, including APEX, use the same PL/SQL API, consisting of the OWA* packages, the HTP and HTF packages, and the WPG_DOCLOAD package. There is also the PL/SQL Server Page specification which uses the "loadpsp" program, or the DBMS_PSP package to compile PL/SQL Server Pages into PL/SQL procedures that use the API. These APIs are well documented. All a gateway has to do is provide a way to execute a procedure that calls the API, and read the results, which the API writes to a buffer. But in practice, it needs to do more. It has to parse parameters to create the procedure call. Some parameters can be files to upload - the files need to be written to a BLOB (or LONG for backward compatibility) column in a user-named table. It has to handle errors.

    2. Because there is no specification, different gateways could work different ways. But the original gateway, the Apache module named mod_plsql, provides the model that most other gateways try to follow. This doesn't always happen. For instance, an early version of the APEX Listener 1.0 didn't allow flexible parameter passing as mod_plsql does. Oracle does listen to its customers, so a later version gained this support. On the other hand, the APEX Listener has some capabilities that mod_plsql doesn't have - the REST web service and JSON support that Henry mentions in his fifth question is an example.

    3. The work around is to configure the listener with "java -jar apex.war +command subcommand+", or change the configuration file directly. Fortunately, there is more information about the configuration file in the released version's docs than in the Early Access docs.

    4. One alternative to the APEX Listener is to use Oracle XSQL, which is part of Oracle's XML Developers Kit. This can be installed in Tomcat. But XSQL is better at serving up a single page - like a single report, than for an entire application.
  • 4. Re: ApEx Listener 2.0, non-ApEx application
    user9305659 Newbie
    Currently Being Moderated

    Hi,

    just one question.

    We're trying to use apex listener in order to comunicate with a non apex application.

    The asis situation is an Oracle HTTP tha use the modplsql to communicate with a DB.

    Now we wanna  use weblogic in order to protect the application with the saml2 protocol.

    So because weblogic don't use the modplsql, we've seen that you use the apex listener. The question is when we've configured  the apex listener the configuration try to go into an apex application and of course we'haven't.

    Do you have some suggestions.

     

    Regards

    Dario