Databases Reference
In-Depth Information
Notice how the worksheet name has been copied into the collection column C001 and we know the
line number in the Excel document from the SEQ ID column.
If you have ever had to provide this kind of upload functionality in your applications, I am sure you
appreciate just how useful this feature can be. In the past we have asked clients to provide data in
comma separated value format rather than native Excel, but having this kind of native Excel integration
means one less step for people to perform when uploading data. This feature alone could be reason
enough to convince some people to use the APEX Listener over the alternatives.
The second feature I want to discuss is resource templates . So what are resource templates? They are
a feature that allows you to provide a REST interface to your application to the outside world. If you're
not familiar with REST, it stands for Representational State Transfer , essentially a web service. This
allows other (even non-APEX) systems to interface with your system. Oracle Application Express has for
a long time now been able to consume remote web services, but it has not been easy to publish web
services without resorting to Java (which kind of defeats the purpose of developing in APEX). However,
by using the APEX Listener you can quite easily provide these REST interfaces that can be called from
remote systems, or perhaps even your own APEX systems.
So what can you do with resource templates? Well, they allow you to define the REST interface itself
in terms of the URI (Uniform Resource Identifier) that the REST interface will be called from and to link
that to an underlying SQL query or PL/SQL block of code.
The easiest way to visualize this is with a quick example. You can edit the resource templates in the
APEX Listener using the URL
http://localhost:8080/apex/resourceTemplates
changing the hostname and port number to suit your environment.
You can see in Figure 1-40 that you can also access the Resource Templates editor via the regular
administration pages by clicking the Resource Templates link.
Figure 1-40. Accessing the Resource Templates editor
If you click the Add Resource Template button you will see that it creates a sample template for you,
as shown in Figure 1-41.
Search WWH ::




Custom Search