Lino Schildenfeld 10 - 11th
November 2016
APEX RESTful Services
and Stripe
www.apexRnD.co.nz
lschilde.blogspot.com
@LinoSchilde
lschilde@apexRnD.co.nz
AUSOUG Connect 2016
in short
APEX R&D manager for NZ/AU
10+ years Oracle development experience
APEX blogger, presenter and enthusiast
NZ APEX meetup organizer
www.meetup.com/ORCLAPEX-NZ
Who am I?
About Web Services?
Intro
 Enable applications to interact over the Web in a platform-neutral
language independent environment
 Typically based on Simple Object Access Protocol (SOAP) or
Representational State Transfer (REST) architectures
 Message formats
 SOAP (Simple Object Access Protorcol)
 REST (Representational State Transfer)
 Returns a status code over HTTP
 http://www.restapitutorial.com/httpstatuscodes.html
SOAP
apex.oracle.comapex.world
WSDL - Web Service Definition Language

World Wide Web Consortium standard protocol

sending and receiving requests and responses across the Internet

messages sent back and forth between a provider and a user in SOAP
envelopes

Weather Service, Geocoding, Twitter and other social media resources

based on XML
RESTful Service
apex.oracle.comapex.world
RESTful
Why is it called Representational State Transfer?
The Web is comprised of resources. A resource is any item of interest.
For example, the Boeing Aircraft Corp may define a 747 resource.
Clients may access that resource with this URL:
http://www.boeing.com/commercial/747/
A representation of the resource is returned (e.g., Boeing747.html). The
representation places the client application in a state. The new representation
places the client application into yet another state. Thus, the client application
changes (transfers) state with each resource representation --> Representational
State Transfer!
How REST works?
Info

It is architectual model for development

It is not a Protocol or W3C Standard

REST := Representational State Transfer year 2000 by Roy Fielding

HTTP in its core

Lightweight alternative for Remote Procedure Call and Web Services

GET, POST, PUT, DELETE, OPTIONS methods

The default language of REST web services is JSON
WSDL and RESTFul differences
Differences

The RESTful scope is found in the URI

Does not require the overhead of XML and SOAP envelopes

Inputs are typically provided in the URI - GET, POST, PUT, HEAD, and
DELETE.

WSDL Webservice is more flexible but harder to code

RESTful is easier to configure

In APEX you can write your own RESTful Services

You can consume both – WSDL and RESTful
Benefits of running ORDS
Webservices in APEX
Introduced

Version 1.5 (2004)

WSDL based – offers Forms und Forms with Report

Version 4.0 (2010)

apex_web_service API

RESTful Web Service support

Versions 4.2 - 5.0 further enhancement for RESTful with configuration
options in Shared components
How to create?
Setup

Three requirements for using Web Services:

You need to enable it

Grant connect to apex_restful_service user

ACL Configured

ORDS installation and configuration
DEMO time
In practice
Further info and references

http://www.doag.org/formes/servlet/DocNavi?
action=getFile&did=4601171&key=apex-plugin.com

ODTUG KSOPE 2014-2016 presentations

http://isu.ifmo.ru/docs/apex41/doc.41/e21674/advnc_web_services.htm

http://www.explorer-development.uk.com/making-consuming-rest-web-services-
using-ords-apex/

http://www.xfront.com/REST-Web-Services.html

http://warp11.nl/2011/07/calling-a-rest-webservice-with-plsql/

http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/schema /
50/Creating_RESTful_web_services/Creating_RESTful_web_services.html#overvi
ew
www.apexofficeprint.com
Q&A
www.apexRnD.co.nz
lschilde.blogspot.com
@LinoSchilde
lschilde@apexRnD.co.nz

APEX, restful services and STRIPE

  • 1.
    Lino Schildenfeld 10- 11th November 2016 APEX RESTful Services and Stripe www.apexRnD.co.nz lschilde.blogspot.com @LinoSchilde lschilde@apexRnD.co.nz AUSOUG Connect 2016
  • 2.
    in short APEX R&Dmanager for NZ/AU 10+ years Oracle development experience APEX blogger, presenter and enthusiast NZ APEX meetup organizer www.meetup.com/ORCLAPEX-NZ Who am I?
  • 3.
  • 4.
    Intro  Enable applicationsto interact over the Web in a platform-neutral language independent environment  Typically based on Simple Object Access Protocol (SOAP) or Representational State Transfer (REST) architectures  Message formats  SOAP (Simple Object Access Protorcol)  REST (Representational State Transfer)  Returns a status code over HTTP  http://www.restapitutorial.com/httpstatuscodes.html
  • 5.
  • 6.
    WSDL - WebService Definition Language  World Wide Web Consortium standard protocol  sending and receiving requests and responses across the Internet  messages sent back and forth between a provider and a user in SOAP envelopes  Weather Service, Geocoding, Twitter and other social media resources  based on XML
  • 8.
  • 9.
    RESTful Why is itcalled Representational State Transfer? The Web is comprised of resources. A resource is any item of interest. For example, the Boeing Aircraft Corp may define a 747 resource. Clients may access that resource with this URL: http://www.boeing.com/commercial/747/ A representation of the resource is returned (e.g., Boeing747.html). The representation places the client application in a state. The new representation places the client application into yet another state. Thus, the client application changes (transfers) state with each resource representation --> Representational State Transfer!
  • 10.
  • 11.
    Info  It is architectualmodel for development  It is not a Protocol or W3C Standard  REST := Representational State Transfer year 2000 by Roy Fielding  HTTP in its core  Lightweight alternative for Remote Procedure Call and Web Services  GET, POST, PUT, DELETE, OPTIONS methods  The default language of REST web services is JSON
  • 12.
    WSDL and RESTFuldifferences
  • 13.
    Differences  The RESTful scopeis found in the URI  Does not require the overhead of XML and SOAP envelopes  Inputs are typically provided in the URI - GET, POST, PUT, HEAD, and DELETE.  WSDL Webservice is more flexible but harder to code  RESTful is easier to configure  In APEX you can write your own RESTful Services  You can consume both – WSDL and RESTful
  • 14.
  • 15.
  • 16.
    Introduced  Version 1.5 (2004)  WSDLbased – offers Forms und Forms with Report  Version 4.0 (2010)  apex_web_service API  RESTful Web Service support  Versions 4.2 - 5.0 further enhancement for RESTful with configuration options in Shared components
  • 17.
  • 18.
    Setup  Three requirements forusing Web Services:  You need to enable it  Grant connect to apex_restful_service user  ACL Configured  ORDS installation and configuration
  • 19.
  • 20.
  • 21.
    Further info andreferences  http://www.doag.org/formes/servlet/DocNavi? action=getFile&did=4601171&key=apex-plugin.com  ODTUG KSOPE 2014-2016 presentations  http://isu.ifmo.ru/docs/apex41/doc.41/e21674/advnc_web_services.htm  http://www.explorer-development.uk.com/making-consuming-rest-web-services- using-ords-apex/  http://www.xfront.com/REST-Web-Services.html  http://warp11.nl/2011/07/calling-a-rest-webservice-with-plsql/  http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/schema / 50/Creating_RESTful_web_services/Creating_RESTful_web_services.html#overvi ew
  • 22.
  • 23.