O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

301_Kubiček+Webservices (2).pdf

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
App fabric introduction
App fabric introduction
Carregando em…3
×

Confira estes a seguir

1 de 19 Anúncio

Mais Conteúdo rRelacionado

Semelhante a 301_Kubiček+Webservices (2).pdf (20)

Mais recentes (20)

Anúncio

301_Kubiček+Webservices (2).pdf

  1. 1. Oracle APEX 4.2: Webservices Denes Kubicek
  2. 2. APEX 4.2 – Webservices AGENDA Seite 1 Oracle APEX 4.2: Webservices Denes Kubicek
  3. 3. APEX 4.2 – Webservices ► About Webservices ► Why Webservices? ► Webservices in APEX ► Webservice API – WSDL and RESTful Services from the Backend ► RESTful support in APEX 4.2 ► RESTful support in APEX 4.2 Seite 2 Oracle APEX 4.2: Webservices Denes Kubicek
  4. 4. APEX 4.2 – Webservices About Webservices Seite 3 Oracle APEX 4.2: Webservices Denes Kubicek
  5. 5. APEX 4.2 – About Webservices ► Web Services belong to the group of API’s (application programming interface) accessed by HTTP (Hyper Transfer Protocol) and run on a hosting system. ► There are two groups of Web Services: ► Big Web Services ► RESTful Web Services Seite 4 Oracle APEX 4.2: Webservices Denes Kubicek ► RESTful Web Services
  6. 6. APEX 4.2 – About Webservices ► Protocols are XML plus HTTP (less commonly SMTP, FTP, and BEEP also used as transport) ► Message formats ► SOAP (Simple Object Access Protorcoll) ► XML-RPC Seite 5 Oracle APEX 4.2: Webservices Denes Kubicek ► REST (Representational State Transfer) ► List and Search in UDDI (Universal Description, Discovery and Integration) ► WSDL (Web Services Definition Language) – describes where, what and how.
  7. 7. APEX 4.2 – Webservices Why Webservices? Seite 6 Oracle APEX 4.2: Webservices Denes Kubicek
  8. 8. APEX 4.2 – Why Webservices? ► You will use Webservices there, where you have a central point of query which serves different consumers. ► Examples: ► Geocoding ► Weather service ► Many more… ► Since there are many differenct consumers running on different ► Since there are many differenct consumers running on different systems, standard format of communication is required. ► The consumers should be able to understand the language in order to consume the response of a Web Service. Seite 7 Oracle APEX 4.2: Webservices Denes Kubicek
  9. 9. APEX 4.2 – Webservices Webservices in APEX Seite 8 Oracle APEX 4.2: Webservices Denes Kubicek
  10. 10. APEX 4.2 – Webservices in APEX ► Version 1.5 (2004) ► UDDI Browsing ► WSDL based – offers Forms und Forms with Report created by a Web-Service Wizard ► Tools for testing of the references. Seite 9 Oracle APEX 4.2: Webservices Denes Kubicek ► SOAP 1.1 RPC encryption.
  11. 11. APEX 4.2 – Webservices in APEX ► Version 3.0 (2007) ► SOAP 1.1 document support. ► Support for XML-RPC. ► Simple authentication. ► SSL support. Seite 10 Oracle APEX 4.2: Webservices Denes Kubicek ► SSL support.
  12. 12. APEX 4.2 – Webservices in APEX ► Version 4.0 (2010) ► apex_web_service API. ► RESTful Web Service support. ► SOAP 1.2 support. ► Forms und Forms with Report created by Web-Service Wizard can Seite 11 Oracle APEX 4.2: Webservices Denes Kubicek ► Forms und Forms with Report created by Web-Service Wizard can be modified manually. ► Reading and setting Cookies and HTTP Header ► A possibility to provide RESTful Web Service reports in an application.
  13. 13. APEX 4.2 – Webservices in APEX ► Version 4.2 (2012) ► Support for RESTful Webservices through a sepparate interface within SQL Workshop. ► Improved support of the Web Service configuration and webservice consument within Shared Components Seite 12 Oracle APEX 4.2: Webservices Denes Kubicek
  14. 14. APEX 4.2 – Webservices Differences between WSDL and RESTful Webservice Seite 13 Oracle APEX 4.2: Webservices Denes Kubicek
  15. 15. APEX 4.2 – Webservice API ► WSDL Webservice is more flexible. ► WSDL is harder to code (Coding). ► RESTful is easier to configure. ► In APEX you can write your own RESTful Services. ► You can consume both – WSDL and RESTful. Seite 14 Oracle APEX 4.2: Webservices Denes Kubicek ► You can consume both – WSDL and RESTful.
  16. 16. APEX 4.2 – Webservices Webservice API – WSDL and RESTful Services from the Backend Seite 15 Oracle APEX 4.2: Webservices Denes Kubicek Backend
  17. 17. APEX 4.2 – Webservice API ► Webservice API enables usage of Web Services in all areas of APEX – you can run it in an application or from the back end: ► On Demand Process ► Authentication ► Validation Seite 16 Oracle APEX 4.2: Webservices Denes Kubicek ► It has functions for encrypting / decrypting of binary data from to base 64 encryption. ► Functions for responding based on XPath expressions. ► Setting and reading HHTP Header and Cookies.
  18. 18. Requirements ► There are three requirements for using Web Services: ► You need to enable INTERNAL / ADMIN > Manage Instance > Security > Allow RESTful Access. ► Your Workspace-Schema hast to get a GRANT from the SYS user: ► 11g database and above has to have a networking configured to support access to the resources. Usually: ALTER USER dkubicek GRANT CONNECT THROUGH apex_rest_public_user; Seite 17 Oracle APEX 4.2: Webservices Denes Kubicek BEGIN dbms_network_acl_admin.create_acl (acl => 'www2.xml', description => 'WWW ACL', principal => 'APEX_040200', is_grant => TRUE, PRIVILEGE => 'connect' ); dbms_network_acl_admin.add_privilege (acl => 'www2.xml', principal => 'APEX_040200', is_grant => TRUE, PRIVILEGE => 'resolve' ); dbms_network_acl_admin.assign_acl (acl => 'www2.xml', HOST => '*'); END; / COMMIT ;
  19. 19. Requirements ► You can create an ACL this way as well: DECLARE acl_path VARCHAR2 (4000); acl_id RAW (16); BEGIN SELECT acl INTO acl_path FROM dba_network_acls WHERE HOST = '*' AND lower_port IS NULL AND upper_port IS NULL; SELECT sys_op_r2o (EXTRACTVALUE (p.res, '/Resource/XMLRef')) INTO acl_id FROM xdb.xdb$acl a, path_view p WHERE EXTRACTVALUE (p.res, '/Resource/XMLRef') = REF (a) AND EQUALS_PATH (p.res, acl_path) = 1; Seite 18 Oracle APEX 4.2: Webservices Denes Kubicek DBMS_XDBZ.validateacl (acl_id); IF dbms_network_acl_admin.check_privilege (acl_path, 'APEX_040200', 'connect') IS NULL THEN dbms_network_acl_admin.add_privilege (acl_path, 'APEX_040200', TRUE, 'connect'); END IF; EXCEPTION WHEN NO_DATA_FOUND THEN dbms_network_acl_admin.create_acl ('power_users.xml', 'ACL that lets power users to connect to everywhere', 'APEX_040200', TRUE, 'connect'); dbms_network_acl_admin.assign_acl ('power_users.xml', '*'); END; / COMMIT ;

×