Apex Listener and Native Database Web Services - ORDS, SODA & JSON in the Database

I'm interested in understanding if the Apex Listener can be used to serve up Oracle native database web services. At http://www.oracle.com/technology/products/database/application_express/apex_listener/apex_listener.html it states that the Apex listener "Can be used for Application Express or any Oracle web-toolkit application". I'm not sure what constitutes as an Oracle web-toolkit application exactly. Just OWA?
Anyone know if the Apex Listener can provide an access point to native database web services?
Thanks,
Jason 

Yes this means it should work for other owa based things. We're working on more/better/funner ? things but that's still being worked on.
-kris 

"Yes this means it should work for other owa based things."
Does that include native database web services? If so, is there any material that may help understand how it can be configured to serve up the native database web services?
Thanks,
Jason 

Native Web Services are not OWA based.
-kris 

jlincoln wrote:
I'm interested in understanding if the Apex Listener can be used to serve up Oracle native database web services. Jason,
You might want to check out the Thoth Gateway (for Microsoft IIS), which can expose any PL/SQL function (or functions in a package) as a SOAP web service:
http://code.google.com/p/thoth-gateway/
More details here:
http://ora-00001.blogspot.com/2009/11/publish-plsql-as-soap-web-service.html
And Kris: Perhaps the Apex Listener can be extended with similar functionality sometime in the future? Consider this an enhancement request... :-)
- Morten
http://ora-00001.blogspot.com 

It's well underway :)
-kris 

To be clear on this, there are a lot of OWA based features which won't work
1. Flexible parameter passing
2. Basic authentication
3. Custom CGI environment passing
It would be useful if the APEX listener team could provide a statement of direction which covers whether they are ever going to implement these features and a roadmap to when they might be expected. Otherwise it leaves standard mod_plsql customers in limbo, as they don't know whether to go with
1. dbms_epg
2. OHS2
3. Apex Listener
Hopefully this is something you guys are working on, as it would make the APEX listener a real replacement for mod_plsql, which given the complexity of OHS in 11gR2 would be a bonus!

Related

Running Non-Apex PL/SQL Web Toolkit Code using Apex Listener 2.0

Greetings,
I am finding bits and piece of information but really need a complete picture of how to run my general Non-Apex PL/SQL Web Toolkit procedures using an existing install of the newest Apex Listener 2.0. I've been using the Embedded Gateway (DBMS_EPG) but now need to expose the procedures from a web server (for security purposes), especially now that I can take advantage of flexible parameter passing and other features available in the later versions of the Apex Listener. I've used OHS/mod_plsql in the past and more recently the embedded gateway. I should note the existing install of the Apex Listener is also being used for our Apex application as well.
So I understand the general concept of forming the URL like I used to with OHS/mod_plsql:
http://host:port/apex/!scott.flexible_params?x=john&y=10&z=doe
My questions are as follows:
1. I understand /apex to be a DAD configured within the listener. Fine. Do I need (and is it possible) to configure another DAD for my Web Toolkit application?
2. To execute a procedure as shown above under the Apex DAD, how do I know which user is configured for that DAD?
3. What steps do I need to take (grants, configurations, etc) do I need to take in order to run a non-Apex procedure using the Apex Listener 2.0?
Many Thanks,
Dale 
Perform a web search using your favorite search engine for the pl/sql web toolkit - or go directly to the online documentation. 
Dale Ward wrote:
Greetings,
I am finding bits and piece of information but really need a complete picture of how to run my general Non-Apex PL/SQL Web Toolkit procedures using an existing install of the newest Apex Listener 2.0. I've been using the Embedded Gateway (DBMS_EPG) but now need to expose the procedures from a web server (for security purposes), especially now that I can take advantage of flexible parameter passing and other features available in the later versions of the Apex Listener. I've used OHS/mod_plsql in the past and more recently the embedded gateway. I should note the existing install of the Apex Listener is also being used for our Apex application as well.
So I understand the general concept of forming the URL like I used to with OHS/mod_plsql:
http://host:port/apex/!scott.flexible_params?x=john&y=10&z=doe
My questions are as follows:
1. I understand /apex to be a DAD configured within the listener. Fine. Do I need (and is it possible) to configure another DAD for my Web Toolkit application?You could make that analogy, but if you have the expectation that Listener performs in exactly the same way as mod_plsql and/or provides the exact same features, then that will not be the case, there's a large overlap, but they are not identical.
Really /apex is the location on the application server where the Listener is made available.
It sounds like you want to configure access to multiple databases/multiple database users. See this documentation link for information on how to do this:
http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/config.htm#CBDIAGHB
>
2. To execute a procedure as shown above under the Apex DAD, how do I know which user is configured for that DAD?When you configure a database connection in Listener you specify the database user to connect as.
3. What steps do I need to take (grants, configurations, etc) do I need to take in order to run a non-Apex procedure using the Apex Listener 2.0?You need to grant the database user you have configured for each connection access to the procedure you wish to invoke.
Many Thanks,
Dale 
Suggesting I use "My favorite search engine" or go "directly to the documentation" is an interesting answer. You'll be happy to know I've employed that approach in the past and it has served useful. When that doesn't work, however, I sometimes come to this forum to consult with experts and get specific answers. 
Colm,
Thank you for taking the time to respond. Your answer was very helpful and I feel much more comfortable going down this path. My so-called non-Apex application is actually just a RESTful web services engine driven by stored SQLX statements. As a result, the features I need from the Listener is literally limited to support for HTP.P, Flexible Parameter Passing (which I'm comfortable exists in usable fashion in 2.0) and access to the CGI Environment variables via owa_util.get_cgi_env (which I assume the Apex Listener still supports?)
From your statement about the differences between the Apex Listener and mod_plsql, I am curious if those difference include anthing of significance in your view.
Thanks,
Dale 
Allowing for some follow-up responses 
Dale Ward wrote:
Colm,
Thank you for taking the time to respond. Your answer was very helpful and I feel much more comfortable going down this path. My so-called non-Apex application is actually just a RESTful web services engine driven by stored SQLX statements. As a result, the features I need from the Listener is literally limited to support for HTP.P, Flexible Parameter Passing (which I'm comfortable exists in usable fashion in 2.0) and access to the CGI Environment variables via owa_util.get_cgi_env (which I assume the Apex Listener still supports?)
From your statement about the differences between the Apex Listener and mod_plsql, I am curious if those difference include anthing of significance in your view.Nope, nothing of significance, I think you should also look at the RESTful Web Services functionality in Listener 2.0.x, one of the powerful features in 2.0.x is that when using a PL/SQL handler RESTful Services operate in a proper OWA environment, meaning the RESTful Service can invoke owa_util.get_cgi_env etc., you would be able to support the HTTP PUT and DELETE methods if you go down this route.
The 2.0.2 release includes new documentation on developing RESTful Services (in the 2.0.2 download zip) , have a look, and if you've any further questions, ask away.
Thanks,
Dale

Oracle Application Express Listener benefits

Hi everyone,
We're trying to install APEX 4.1.
Oracle Application Express Listener is it good for debugging ?
Can I have more details about the listener ?
Is it very helpful, is it a must ?
Thanks. Bye. 
Hi,
We're trying to install APEX 4.1.Go for it! ;)
Oracle Application Express Listener is it good for debugging ?What do you want to debug? You can certainly do all common APEX debugging with it.
Can I have more details about the listener ?Sure. Have you scanned the [url http://www.oracle.com/technetwork/developer-tools/apex-listener/overview/index.html]Product Overview yet? And unlike other products, the [url http://download.oracle.com/otn/java/appexpress/1.1/docs/AELIG/E21058_01.pdf]Installation and Development Guide is pretty compact, so you could take a look there as well. Especially the Preface and the chapter about Resource Templates should catch your eyes...
Is it very helpful, is it a must ?It is helpful if need a fast solution to access APEX and you either don't use another web server (e.g. OHS or EPG via XDB HTTP Server) yet, or you have some JEE Container and want to consolidate your architecture (i.e., shutdown OHS or EPG), or you just want it for curiosity. It's not a must, you can still use the "old" web server options to host your APEX if you don't need any of the new features offered by the APEX Listener.
-Udo

Best way to deploy APEX for a customer

I have a customer who has Oracle 11GR2 Standard Edition for Windows in production and I am teaching them how to use develop using APEX, but I don't quite understand how to deploy it. The Apex Listener documentation talks about OracleGlass, WLS, and OC4J, but those are all products that my client is not licensed for. There is a way to deploy the Apex Listener standalone but several threads say that should not be used for production, and I don't see a way to automate the restart of the standalone listener on Windows after a reboot; it's not a service. I read a somewhat relevant thread with comments from UDO and Kris Rice but I doesn't seem to clarify.
Is there a production-quality way to deploy the Apex Listener without having to pay for GlassFish/WLS etc... licenses?
Here's the thread with comments from Udo and Kris, but I don't think it answers the question, or I don't understand the answer:
Re: License/Cost for APEX Listener 
Hi Ron,
you can deploy APEX Listener in the so called Standalone Mode and have it licensed (and supported) with your customers 11.2 SE. As you've already mentioned, the embedded container doesn't have features like running as a service. You could add that kind of functionality with service wrappers such as nssm or srvany, as described here: {message:id=9606494}, but this scenario won't be supported by Oracle as the service wrapper is not part of their product.
If you (or effectively your customer) don't need (want to pay) support for Oracle, you don't necessarily need one of the named licensed JEE containers. You could use GlassFish Open Source Edition (which works pretty similar to the supported and documented one from the APEX Listener point of view), or even Tomcat (which has been supported by Kris during EA phase but had to be dropped officially, probably because Oracle can/will only support their own products - which I think is understandable).
I hope I could answer your license-deployment-question. If I didn't hit your point, please let me know what I need to explain better.
-Udo 
Thanks! Just wanted to be sure I was looking at this correctly.

Listener Benefits?

Hi
I am wondering if someone can list benefits of moving my intranet based APEX/Oracle Http Webserver to Apex/Apex Listener..
Is it faster?
If I spend $$ getting it switched over.. will it payback ?
Thanks
Dean 
Hi Dean,
http://www.oracle.com/technetwork/developer-tools/apex-listener/overview/index.html says:
<b>Why use the APEX Listener</b><ul> <li>Allows easy integration with Java-based middleware</li> <li>Can be used for Application Express or any Oracle web-toolkit application</li> <li>Ease of configuration</li> <li>Lightweight</li> <li>When combined with Glassfish, just unzip and you are good to go</li> </ul></div>
>
More experiences shared on http://dgielis.blogspot.in/2012/08/moving-to-oracle-apex-listener.html.
In a nutshell, Apexlistener does all that OHS does and some more.
a. Multiple DB support in ApexListener 2 is really interesting
b. ApexListener is under active development, which cannot be said of OHS.
c. Developed and deployed in Java, OHS MOD_PLSQL is C from what I remember.
d. ApexListener is free . Though you may incur licensing cost for the J2EE container if you decide to use one of the supported ones and do not have have one of them already deployed.
Do not expect any great performance improvement etc. but a better stack in the long run, IMHO.
Cheers, 
Hello Dean,
in addition to the ressources Prabodh referenced, there have been other threads on that issue, e.g. {message:id=9882947}.
I consider the fact that APEX Listener is the future web server for APEX the most important aspect. If you have your OHS environment stable and you don't need what APEX Listener offers you, you might stay where you are. If RESTful webservices are of interest for you, or some other features that are announced (e.g. FOP-pased PDF export, direct XLS import, etc.), you change to APEX Listener at any time you can afford it.
I'm not sure if your environment is so complex that you acutally have to spend a lot of money to get the change. At least, as Prabodh also mentioned, APEX Listener is already licensed with your database, so it would just be the JEE container. To start to play, you could use the so called "Standalone Mode" where APEX Listener runs on the embedded JEE Container it is bundled with.
-Udo

ApEx Listener 2.0, non-ApEx application

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. 
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 
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, 
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. 
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. RegardsDario

Categories

Resources