SlideShare una empresa de Scribd logo
1 de 49
Back to Basics:
Simple Database Web Services
SAGE Computing Services
Customised Oracle Training Workshops and Consulting
Chris Muir
Oracle Consultant and Trainer
♠ Oracle ACE Director - Fusion Middleware
http://one-size-doesnt-fit-all.blogspot.com
Photo thanks to spackletoe @ Flickr.com under CC
Agenda
• Part I: Understanding web services
• Part II: Consuming web services from the database
• Part III: Publishing web services from 11g
Agenda
• Part I: Understanding web services
• Part II: Consuming web services from the database
• Part III: Publishing web services from 11g
Agenda
• Part I: Understanding web services
• Part II: Consuming web services from the database
• Part III: Publishing web services from 11g
Part I:
Understanding
Web Services
SOAP, WSDL, RPC
Style, Document
Style, XML, XML
Namespaces, HTTP
request/response .
... blah blah blah
Photo thanks to dalvenjah @ Flickr.com under CC
Photo thanks to B.G. - Oodwin & Andrea Fregnani @ Flickr.com under CC
SOAP vs REST Web Services
SOAP Web Services Defined
Host: http://www.sagecomputing.com.au
Web
Web Service /bookings
/employees
/timesheets
Internet
HTTP Request/Response
Endpoints
Server
Web Service
Web Service
SOAP Web Services Defined
Endpoint: http://www.sagecomputing.com.au/employees
Web
Service
Employees
getAddress
getName
updateAddress
XML Namespace: http://www.sagecomputing.com.au/emp
Operation
Operation
Operation
Uniquely identified
in an XML
Namespace
SOAP Web Service API Styles:
1.Remote Procedure Call (RPC)
2.Document
Photo thanks to Phil Romans@ Flickr.com under CC
Remote Procedure Call (RPC) Style
Host: http://www.sagecomputing.com.au
Endpoint: http://www.sagecomputing.com.au/employees
Namespace: http://www.sagecomputing.com.au/emp
Operation: getName
In: integer employeeNumber
Return: string name
In: string nameCase http://www.w3.org/2001/XMLSchema
Request:
<sage:getName xmlns:sage="http://www.sagecomputing.com.au/emp">
<employeeNumber>1234</employeeNumber>
<nameCase>U</nameCase>
</sage:getName>
Response:
<sage:getName xmlns:sage="http://www.sagecomputing.com.au/emp">
<name>CHRISTOPHER MUIR</name>
</sage:getName>
Photo thanks to redjar @ Flickr.com under CC
Remote Procedure Call (RPC) Style
Request:
<sage:getName xmlns:sage="http://www.sagecomputing.com.au/emp"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance">
<employeeNumber xsi:type="xsd:integer">1234</employeeNumber>
<nameCase xsi:type="xsd:string">L</nameCase>
</sage:getName>
Photo thanks to redjar @ Flickr.com under CC
Response:
<sage:getName xmlns:sage="http:// www.sagecomputing.com.au/emp"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance">
<name xsi:type="xsd:string">christopher muir</name>
</sage:getName>
Document Style
Host: http://www.sagecomputing.com.au
Endpoint: http://www.sagecomputing.com.au/employees
Namespace: http://www.sagecomputing.com.au/emp
Operation: getName
In: XML-Schema getNameInput
Return: XML-Schema getNameOutput
Photo thanks to ARS
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema
targetNamespace="http://www.sagecomputing.com.au/emp">
<xsd:element name="getNameInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="employeeNumber" type="xsd:integer"/>
<xsd:element name="nameCase" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Document Style "In" XML Schema
XML Schema:
Photo thanks to redjar @ Flickr.com under CC
Request:
<sage:getNameInput xmlns:sage="http://www.sagecomputing.com.au/emp">
<employeeNumber>1234</employeeNumber>
<nameCase>M</nameCase>
</sage:getNameInput>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema
targetNamespace="http://www.sagecomputing.com.au/emp">
<xsd:element name="getNameInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="employeeNumber" type="xsd:integer"/>
<xsd:element name="nameCase" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getNameOutput" type="xsd:string"/>
</xsd:schema>
Document Style "In + Return" XML Schema
XML Schema:
Photo thanks to redjar @ Flickr.com under CC
Response:
<sage:getNameOutput xmlns:sage="http://www.sagecomputing.com.au/emp">
Christopher Muir</sage:getNameOutput>
SOAP Envelope
Request:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
... Request XML payload ...
</soap:Body>
</soap:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
... Response XML payload ...
</env:Body>
</env:Envelope>
Web Service Description Language (WSDL)
Photo thanks to redjar @ Flickr.com under CC
• De facto standard for describing web services
• XML based + W3C standards based
• Publish web service API
http://www.sagecomputing.com.au/employees?wsdl
• Assists consumer in assembling request
• Not actually required in web service calls
• Port types = grouped operations
• Bindings = data exchange protocol (eg. SOAP over HTTP)
• Ports = endpoints/services
WSDL example
01 <?xml version="1.0" encoding="UTF-8" ?>
02 <definitions targetNamespace="http://www.sagecomputing.com.au/emp"
03 xmlns="http://schemas.xmlsoap.org/wsdl/"
04 xmlns:sage="http://www.sagecomputing.com.au/emp"
05 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
06 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
07 <types/>
08 <message name="getNameInput">
09 <part name="employeeNumber" type="xsd:int"/>
10 <part name="nameCase" type="xsd:string"/>
11 </message>
12 <message name="getNameOutput"><part name="name" type="xsd:string"/></message>
13 <portType name="employees">
14 <operation name="getName" parameterOrder="employeeNumber nameCase">
15 <input message="sage:getNameInput"/>
16 <output message="sage:getNameOutput"/>
17 </operation></portType>
18 <binding name="empSoapHttp" type="sage:employees">
19 <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
20 <operation name="getName">
21 <input><soap:body use="literal" namespace="http://www.sagecomputing.com.au/emp"
22 parts="employeeNumber nameCase"/></input>
23 <output><soap:body use="literal" namespace="http://www.sagecomputing.com.au/emp"
24 parts="name"/></output>
25 </operation></binding>
26 <service name="employees">
27 <port name="empSoapHttpPort" binding="sage:empSoapHttp">
28 <soap:address location="http://www.sagecomputing.com.au/employees"/>
29 </port>
30 </service>
31 </definitions>
Photo thanks to Dominic@ Flickr.com under CC
Part II:
Consuming Web
Services from the
Database
utl_http
utl_dbws
Consuming Web Services
from the Database
• Database provides 2 packages for accessing web services
– utl_http – low level http assembler
– utl_dbws – high level web service package
• 3rd
(alternative) method:
– Load Apache Common's Java HttpClient into db
– Write Java program in db
– Generate PL/SQL wrapper
utl_http
• Available as of 8.0.5
• Send/receive raw HTTP request/responses to external servers
• Advantages:
– Simplistic
– Installed (completely) in the database
– Passed and returns a VARCHAR2 XML payload
– Very easy if you know the XML payload structures
– Doesn't require a WSDL at publisher's site
– Good examples available on the internet
– 3rd
party PL/SQL wrappers available (Tim Hall: soap_api)
• Disadvantages:
– Low level with no smarts to support web services
– Cryptic HTTP error messages
– Oracle documentation is less than useful
utl_http example
01 PROCEDURE call_web_service(i_payload IN VARCHAR2, o_response OUT VARCHAR2) IS
02 v_http_req utl_http.req;
03 v_http_resp utl_http.resp;
04 v_part_response VARCHAR2(32767);
04 BEGIN
05 utl_http.set_proxy('cmuir:pwd@proxy.sagecomputing.com.au:80 ');
06 utl_http.set_wallet('file:/oracle/owallets/', 'pwd');
07
08 v_http_req := utl_http.begin_request(
09 'http://www.sagecomputing.com.au/employees', 'POST', 'HTTP/1.1');
10 utl_http.set_authentication(v_http_req, 'cmuir', 'pwd', 'Basic', TRUE);
11
12 utl_http.set_header(v_http_req, 'Content-Type' ,'text/xml');
13 utl_http.set_header(v_http_req, 'Content-Length' ,length(i_payload));
14 utl_http.set_header(v_http_req, 'SOAPAction' ,'getName');
15
16 utl_http.write_text(v_http_req, i_payload);
17
18 v_http_resp := utl_http.get_response(v_http_req);
19 -- Add handler for HTTP error v_http_resp.status_code >= 500 <= 599
20 BEGIN
21 LOOP
22 utl_http.read_text(v_http_resp, v_part_response);
23 o_response := o_response || v_part_response;
24 END LOOP;
25 EXCEPTION WHEN utl_http.end_of_body THEN
26 NULL;
27 END;
28 utl_http.end_response(v_http_resp);
29 -- Add exception handler
30 END call_web_service;
01 DECLARE
02 v_request VARCHAR2(5000);
03 v_response VARCHAR2(5000);
04
05 v_soap_req VARCHAR2(5000);
06 v_soap_resp VARCHAR2(5000);
07
08 v_xml_resp XMLType;
09
10 BEGIN
11 v_request := '<sage:getNameInput xmlns:sage="http://www.sagecomputing.com.au/emp">'
12 || '<employeeNumber>1234</employeeNumber>'
13 || '<nameCase>M</nameCase>'
14 || '</sage:getNameInput>';
15
16 v_soap_req := '<?xml version = "1.0" encoding = "UTF-8"?>'
17 || '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">'
18 || '<soapenv:Header/>'
19 || '<soapenv:Body>'
20 || v_request
21 || '</soapenv:Body>'
22 || '</soapenv:Envelope>';
23
24 call_web_service(v_soap_req, v_soap_resp);
25
26 -- Strip the SOAP XML envelope from the response
27 v_xml_resp := XMLType.createXml(v_soap_resp);
28 v_response := v_xml_resp.extract(
29 '/soap:Envelope/soap:Body/child::node()'
30 ,'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"').getStringVal();
31
32 END;
Oracle 11g utl_http Security Caveats
• New: Network Access Control
Lists (ACLs)
• Purpose: Fine grained host
access
• Affects: utl_tcp, utl_http,
utl_smtp, utl_mail, utl_inaddr
• Documentation: Oracle
Database Security Guide 11gR1
Chapter 4
• Simple Workaround: Metalink
Note 453786.1
Photo thanks to |m Le' chArt @ Flickr.com under CC
utl_dbws
• Available as of 10gR1
• PL/SQL Java wrapper on oracle.jpub.runtime.dbws.DbwsProxy
• Part of JPublisher
• Advantages:
– High(er) level web service handler
• Disadvantages:
– Not completely installed by default (bah!)
– Poor error reporting (in particular HTTP)
– Queries external WSDL each request
– Oracle documentation is dismal
– Use of HttpUriType does not support wallets or proxies
– Minor bugs in 10gR2 version with external authentication
– Minor issues on calling .Net web services
– Uses database JVM
• Source: Tim Hall's blog
http://www.oracle-base.com/articles/10g/utl_dbws10g.php
Download: http://download.oracle.com/technology/sample_code/
tech/java/jsp/dbws-callout-utility-10131.zip
Extract: dbwsclientws.jar + dbwsclientdb11.jar ->
ORACLE_HOME/sqlj/lib
Execute: ORACLE_HOME/sql/lib/loadjava -u sys/password -r -v
-f -genmissing -s -grant public dbwsclientws.jar
dbwsclientdb11.jar
utl_dbws Installation
Photo thanks to cervus @ Flickr.com under CC
• Slow to install & will produce class
loading errors at end
• Consider reinstalling in separate
schema from sys as per Metalink
note: 469588.1
utl_dbws example
01 DECLARE
02 v_namespace VARCHAR2(1000) := 'http://www.sagecomputing.com.au/emp';
03 v_service_qname utl_dbws.qname := utl_dbws.to_qname(v_namespace,'employees');
04 v_port_qname utl_dbws.qname := utl_dbws.to_qname(v_namespace,'employeesSoapHttpPort');
05 v_operation_qname utl_dbws.qname := utl_dbws.to_qname(v_namespace,'getName');
06
07 v_service utl_dbws.service;
08 v_call utl_dbws.call;
09
10 v_int_type utl_dbws.qname;
11 v_string_type utl_dbws.qname;
12
13 v_request_params utl_dbws.anydata_list; -- RPC style only
14 v_response_anydata AnyData; -- RPC style only
15
16 v_request_xmltype XmlType; -- Document style only
17 v_response_xmltype XmlType; -- Document style only
18
19 BEGIN
20 v_service := utl_dbws.create_service(
21 HttpUriType('http://www.sage.com.au/employees?wsdl'), v_service_qname);
22
23 v_call := utl_dbws.create_call(v_service, v_port_qname, v_operation_qname);
24
25 utl_dbws.set_property(v_call, 'SOAPACTION_USE', 'TRUE');
26 utl_dbws.set_property(v_call, 'SOAPACTION_URI', 'getName');
27 utl_dbws.set_property(v_call, 'ENCODINGSTYLE_URI',
28 'http://schemas.xmlsoap.org/soap/encoding/');
29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'rpc');
29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'document');
Pick one
29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'rpc');
30
31 v_int_type := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'int');
32 v_string_type := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
33
34 utl_dbws.add_parameter(v_call, 'employeeNumber', v_int_type, 'ParameterMode.IN');
35 utl_dbws.add_parameter(v_call, 'nameCase', v_string_type, 'ParameterMode.IN');
36 utl_dbws.set_return_type(v_call, v_string_type);
37
38 v_request_params(0) := AnyData.convertNumber(1234);
39 v_request_params(1) := AnyData.convertVarchar('M');
40
41 v_response_anydata := utl_dbws.invoke(v_call, v_request_params);
42 dbms_output.put_line('Result = ' || v_response_anydata.accessVarchar2);
43
44 utl_dbws.release_call(v_call);
45 utl_dbws.release_service(v_service);
46 END;
47 /
Result = Christopher Muir
29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'document');
30
31 v_string_type := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
32
33 utl_dbws.add_parameter(v_call, 'Request', v_string_type, 'ParameterMode.IN');
34 utl_dbws.set_return_type(v_call, v_string_type);
35
36 v_request_xmltype := XmlType('<?xml version="1.0" encoding="utf-8"?>'
37 || '<getNameInput xmlns="' || v_namespace || '">'
38 || '<employeeNumber>1234</employeeNumber>'
39 || '<nameCase>U</nameCase>'
40 || '</getNameInput>');
41
42 v_response_xmltype := utl_dbws.invoke(v_call, v_request_xmltype);
43
44 dbms_output.put_line('Result = ' || v_response_xmltype.getStringVal());
45
46 utl_dbws.release_call(v_call);
47 utl_dbws.release_service(v_service);
48 END;
49 /
Result = <ns0:getNameOutput xmlns:ns0="http://www.sagecomputing.com.au/emp/">CHRISTOPHER
MUIR</ns0:getNameOutput>
Photo thanks to Nicki's Pix @ Flickr.com under CC
Photo thanks to Daquella manera @ Flickr.com under CC
Part III:
Publishing Web
Services from the
Database
Native Web
Services
Photo thanks to The Dilla Lama @ Flickr.com under CC
11g Native Web Services
• Available as of RDBMS 11gR1
• Provided through Oracle XML DB feature set
• Publishes:
– SQL & XQuery query facility
– Stored PL/SQL procedures and functions including packages
• SOAP 1.1 compliant, WSDL automatically generated
• Advantages:
– Simple, no application server required
• Disadvantages:
– No control over WSDL naming conventions and payload
structures
– Security concerns as web services are exposed directly
from database layer
11g Native Web Services Installation
Photo thanks to makelessnoise @ Flickr.com under CC
Native PL/SQL Web Services
• Publish any procedure, function or package module
• Support for parameters using most primitive datatypes and object
types, not %rowtype
• Endpoint format:
http://<host>:<port>/orawsv/<schema>/<methodname>
http://<host>:<port>/orawsv/<schema>/<package>/<methodname>
• WSDL format:
http://<host>:<port>/orawsv/<schema>/<methodname>?wsdl
http://<host>:<port>/orawsv/<schema>/<package>/<methodname>?wsdl
• Example:
http://www.sagecomputing.com.au:8080/orawsv/SAGE/TEST?wsdl
• Schema/package/module names must match database case name
• Requires HTTP basic authentication with schema username/pwd
Native PL/SQL Web Service "Example"
FUNCTION get_name(employeeNumber IN NUMBER, nameCase IN VARCHAR2)
RETURN VARCHAR2 AS
CURSOR c_name IS
SELECT decode(nameCase,'U',upper(name),'L',lower(name),initcap(name)) name
FROM employees
WHERE emp_no = employeeNumber;
v_name VARCHAR2(100);
BEGIN
OPEN c_name;
FETCH c_name INTO v_name;
CLOSE c_name;
RETURN v_name;
END get_name;
Native PL/SQL Web Service "Request"
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:get="http://xmlns.oracle.com/orawsv/SAGE/GET_NAME">
<soapenv:Header/>
<soapenv:Body>
<get:SVARCHAR2-GET_NAMEInput>
<get:EMPLOYEENUMBER-NUMBER-IN>1234</get:EMPLOYEENUMBER-NUMBER-IN>
<get:NAMECASE-VARCHAR2-IN>U</get:NAMECASE-VARCHAR2-IN>
</get:SVARCHAR2-GET_NAMEInput>
</soapenv:Body>
</soapenv:Envelope>
Native PL/SQL Web Service "Response"
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GET_NAMEOutput xmlns="http://xmlns.oracle.com/orawsv/SAGE/GET_NAME">
<RETURN>CHRISTOPHER MUIR</RETURN>
</GET_NAMEOutput>
</soap:Body>
</soap:Envelope>
Native Query Web Services
• Queries & DML supported on any objects accessible via schema
• Endpoint format:
http://<host>:<port>/orawsv
• WSDL format:
http://<host>:<port>/orawsv?wsdl
• Example:
http://www.sagecomputing.com.au:8080/orawsv?wsdl
• Requires HTTP basic authentication with schema username/pwd
• Takes a basic SQL string with bind parameters
• Returns XML structure containing data
• Number of parameters to influence result
Native Query Web Service "Request"
Request
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:oraw="http://xmlns.oracle.com/orawsv">
<soapenv:Header/>
<soapenv:Body>
<oraw:query>
<oraw:query_text type="SQL">
<![CDATA[SELECT * FROM employees WHERE emp_id = :vEmpId]]>
</oraw:query_text>
<oraw:bind name="vEmpId">1234</oraw:bind>
</oraw:query>
</soapenv:Body>
</soapenv:Envelope>
Native Query Web Service "Response"
Response
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<queryOut xmlns="http://xmlns.oracle.com/orawsv">
<ROWSET>
<ROW>
<EMP_ID>1234</EMP_ID>
<NAME>Christoper Muir</NAME>
</ROW>
</ROWSET>
</queryOut>
</soap:Body>
</soap:Envelope>
Summary
SAGE Computing Services
Customised Oracle Training Workshops and Consulting
Questions and Answers?
Presentations are available from our website:
www.sagecomputing.com.au
enquiries@sagecomputing.com.au
chris.muir@sagecomputing.com.au
http://one-size-doesnt-fit-all.blogspot.com
utl_http References
Tim Hall's blog
http://www.oracle-
base.com/articles/9i/ConsumingWebServices9i.php
http://www.oracle-base.com/dba/Script.php?category=
miscellaneous&file=soap_api.sql
Oracle documentation
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b2
8419/u_http.htm#CHDIAFFA
utl_dbws References
Tim Hall's blog
http://www.oracle-base.com/articles/10g/utl_dbws10g.php
Marc Kelderman's blog
http://orasoa.blogspot.com/2006/11/calling-bpel-process-
with-utldbws.html
Stellan's blog
http://www.selectedthoughts.com/2007/04/problems-calling-
net-web-services-from.html
Henry Cortez on the OraFAQ forum
http://www.orafaq.com/forum/t/99528/0/
Oracle 10g documentation
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b1
4258/u_dbws.htm#i1001769
Native Web Services References
Tim Hall's blog
http://www.oracle-base.com/articles/11g/
NativeOracleXmlDbWebServices_11gR1.php
Paul Gallagher's blog
http://tardate.blogspot.com/2007/08/first-tests-of-11g-
native-web-services.html
Marc Thompson's blog
http://marc-on-oracle.blogspot.com/2007/12/11g-database-
installation-and-native.html
Oracle 11g documentation
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b2
8369/xdb_web_services.htm

Más contenido relacionado

La actualidad más candente

Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuAppUniverz Org
 
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...Uniface
 
Building performance into the new yahoo homepage presentation
Building performance into the new yahoo  homepage presentationBuilding performance into the new yahoo  homepage presentation
Building performance into the new yahoo homepage presentationmasudakram
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat ClientPaul Klipp
 
Offline capable web applications with Google Gears and Dojo Offline
Offline capable web applications with Google Gears and Dojo OfflineOffline capable web applications with Google Gears and Dojo Offline
Offline capable web applications with Google Gears and Dojo Offlineguestcb5c22
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Nicholas Zakas
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceNicholas Zakas
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksColdFusionConference
 
Interoperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITInteroperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITCarol McDonald
 
Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the IslandsOpening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the IslandsBastian Hofmann
 
The Case for HTTP/2 - GreeceJS - June 2016
The Case for HTTP/2 -  GreeceJS - June 2016The Case for HTTP/2 -  GreeceJS - June 2016
The Case for HTTP/2 - GreeceJS - June 2016Andy Davies
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSCarol McDonald
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
Spring Web Services
Spring Web ServicesSpring Web Services
Spring Web ServicesEmprovise
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Ontico
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so goodChris Love
 
Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling SoftwareJoshua Long
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 

La actualidad más candente (20)

Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
 
Building performance into the new yahoo homepage presentation
Building performance into the new yahoo  homepage presentationBuilding performance into the new yahoo  homepage presentation
Building performance into the new yahoo homepage presentation
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
 
Offline capable web applications with Google Gears and Dojo Offline
Offline capable web applications with Google Gears and Dojo OfflineOffline capable web applications with Google Gears and Dojo Offline
Offline capable web applications with Google Gears and Dojo Offline
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Interoperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITInteroperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSIT
 
Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the IslandsOpening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the Islands
 
The Case for HTTP/2 - GreeceJS - June 2016
The Case for HTTP/2 -  GreeceJS - June 2016The Case for HTTP/2 -  GreeceJS - June 2016
The Case for HTTP/2 - GreeceJS - June 2016
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
What's Your Problem?
What's Your Problem?What's Your Problem?
What's Your Problem?
 
Java Server Faces
Java Server FacesJava Server Faces
Java Server Faces
 
Spring Web Services
Spring Web ServicesSpring Web Services
Spring Web Services
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so good
 
Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling Software
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 

Destacado

Nextgen Bpm End to End
Nextgen Bpm End to EndNextgen Bpm End to End
Nextgen Bpm End to EndTechnoPeers
 
Ontologising the Health Level Seven (HL7) Standard
Ontologising the Health Level Seven (HL7) StandardOntologising the Health Level Seven (HL7) Standard
Ontologising the Health Level Seven (HL7) StandardRatnesh Sahay
 
SOA standards
SOA standardsSOA standards
SOA standardsKumar
 
Soa business centric and soap basic
Soa business centric and soap basicSoa business centric and soap basic
Soa business centric and soap basicJothi Lakshmi
 
Ebs soa con8716_pdf_8716_0001
Ebs soa con8716_pdf_8716_0001Ebs soa con8716_pdf_8716_0001
Ebs soa con8716_pdf_8716_0001jucaab
 
Splunking HL7 Healthcare Data for Business Value
Splunking HL7 Healthcare Data for Business ValueSplunking HL7 Healthcare Data for Business Value
Splunking HL7 Healthcare Data for Business ValueSplunk
 
Improvements in Hadoop Security
Improvements in Hadoop SecurityImprovements in Hadoop Security
Improvements in Hadoop SecurityDataWorks Summit
 
Is Your Hadoop Environment Secure?
Is Your Hadoop Environment Secure?Is Your Hadoop Environment Secure?
Is Your Hadoop Environment Secure?Datameer
 
Automated Testing for BizTalk HL7 Solutions
Automated Testing for BizTalk HL7 SolutionsAutomated Testing for BizTalk HL7 Solutions
Automated Testing for BizTalk HL7 SolutionsMichael Stephenson
 
Description of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDIDescription of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDITUSHAR VARSHNEY
 
Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...
Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...
Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...Cloudera, Inc.
 
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...Kevin Minder
 
Risk Assessment and Threat Modeling
Risk Assessment and Threat ModelingRisk Assessment and Threat Modeling
Risk Assessment and Threat Modelingsedukull
 
Hyperion analyzer 31 july
Hyperion analyzer 31 julyHyperion analyzer 31 july
Hyperion analyzer 31 julyAmit Sharma
 
Hyperion Planning Class
Hyperion Planning ClassHyperion Planning Class
Hyperion Planning ClassAmit Sharma
 
Bisp training calendar jan 2012
Bisp training calendar jan 2012Bisp training calendar jan 2012
Bisp training calendar jan 2012Amit Sharma
 
Getting started-with-oracle-so a- lab 11
Getting started-with-oracle-so a- lab 11Getting started-with-oracle-so a- lab 11
Getting started-with-oracle-so a- lab 11Amit Sharma
 

Destacado (20)

Nextgen Bpm End to End
Nextgen Bpm End to EndNextgen Bpm End to End
Nextgen Bpm End to End
 
Ontologising the Health Level Seven (HL7) Standard
Ontologising the Health Level Seven (HL7) StandardOntologising the Health Level Seven (HL7) Standard
Ontologising the Health Level Seven (HL7) Standard
 
Webservices REST com Zend Framework
Webservices REST com Zend FrameworkWebservices REST com Zend Framework
Webservices REST com Zend Framework
 
SOA standards
SOA standardsSOA standards
SOA standards
 
Soa business centric and soap basic
Soa business centric and soap basicSoa business centric and soap basic
Soa business centric and soap basic
 
Ebs soa con8716_pdf_8716_0001
Ebs soa con8716_pdf_8716_0001Ebs soa con8716_pdf_8716_0001
Ebs soa con8716_pdf_8716_0001
 
Splunking HL7 Healthcare Data for Business Value
Splunking HL7 Healthcare Data for Business ValueSplunking HL7 Healthcare Data for Business Value
Splunking HL7 Healthcare Data for Business Value
 
Improvements in Hadoop Security
Improvements in Hadoop SecurityImprovements in Hadoop Security
Improvements in Hadoop Security
 
Is Your Hadoop Environment Secure?
Is Your Hadoop Environment Secure?Is Your Hadoop Environment Secure?
Is Your Hadoop Environment Secure?
 
Java security
Java securityJava security
Java security
 
Automated Testing for BizTalk HL7 Solutions
Automated Testing for BizTalk HL7 SolutionsAutomated Testing for BizTalk HL7 Solutions
Automated Testing for BizTalk HL7 Solutions
 
Description of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDIDescription of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDI
 
Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...
Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...
Limitless Data, Rapid Discovery, Powerful Insight: How to Connect Cloudera to...
 
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
 
Risk Assessment and Threat Modeling
Risk Assessment and Threat ModelingRisk Assessment and Threat Modeling
Risk Assessment and Threat Modeling
 
Hfm intro v2
Hfm intro v2Hfm intro v2
Hfm intro v2
 
Hyperion analyzer 31 july
Hyperion analyzer 31 julyHyperion analyzer 31 july
Hyperion analyzer 31 july
 
Hyperion Planning Class
Hyperion Planning ClassHyperion Planning Class
Hyperion Planning Class
 
Bisp training calendar jan 2012
Bisp training calendar jan 2012Bisp training calendar jan 2012
Bisp training calendar jan 2012
 
Getting started-with-oracle-so a- lab 11
Getting started-with-oracle-so a- lab 11Getting started-with-oracle-so a- lab 11
Getting started-with-oracle-so a- lab 11
 

Similar a Back to basics: Simple database web services without the need for SOA

(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014Amazon Web Services
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
Construindo APIs Usando Rails
Construindo APIs Usando RailsConstruindo APIs Usando Rails
Construindo APIs Usando RailsFernando Kakimoto
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyRobert Dempsey
 
SAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesSAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesMarkus Lanthaler
 
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...Puppet
 
Adding Data into your SOA with WSO2 WSAS
Adding Data into your SOA with WSO2 WSASAdding Data into your SOA with WSO2 WSAS
Adding Data into your SOA with WSO2 WSASsumedha.r
 
WSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure EnterpriseWSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure EnterpriseWSO2
 
How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)ICF CIRCUIT
 
Serverless security: attack & defense
 Serverless security: attack & defense Serverless security: attack & defense
Serverless security: attack & defenseSecuRing
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in MuleF K
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIRajkattamuri
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDIShahid Shaik
 
Developing on SQL Azure
Developing on SQL AzureDeveloping on SQL Azure
Developing on SQL AzureIke Ellis
 
Creating an Effective Mobile API
Creating an Effective Mobile API Creating an Effective Mobile API
Creating an Effective Mobile API Nick DeNardis
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17GreeceJS
 

Similar a Back to basics: Simple database web services without the need for SOA (20)

(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Web Services
Web ServicesWeb Services
Web Services
 
ApacheCon 2005
ApacheCon 2005ApacheCon 2005
ApacheCon 2005
 
Construindo APIs Usando Rails
Construindo APIs Usando RailsConstruindo APIs Usando Rails
Construindo APIs Usando Rails
 
Camel as a_glue
Camel as a_glueCamel as a_glue
Camel as a_glue
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with Ruby
 
SAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesSAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based Services
 
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
 
Adding Data into your SOA with WSO2 WSAS
Adding Data into your SOA with WSO2 WSASAdding Data into your SOA with WSO2 WSAS
Adding Data into your SOA with WSO2 WSAS
 
WSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure EnterpriseWSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure Enterprise
 
How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)How to migrate from any CMS (thru the front-door)
How to migrate from any CMS (thru the front-door)
 
Serverless security: attack & defense
 Serverless security: attack & defense Serverless security: attack & defense
Serverless security: attack & defense
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in Mule
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDI
 
Developing on SQL Azure
Developing on SQL AzureDeveloping on SQL Azure
Developing on SQL Azure
 
Creating an Effective Mobile API
Creating an Effective Mobile API Creating an Effective Mobile API
Creating an Effective Mobile API
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 

Más de Sage Computing Services

Bind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning NightmareBind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning NightmareSage Computing Services
 
Whose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problemsWhose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problemsSage Computing Services
 
New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...Sage Computing Services
 
How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?Sage Computing Services
 
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
Take a load off! Load testing your Oracle APEX or JDeveloper web applicationsTake a load off! Load testing your Oracle APEX or JDeveloper web applications
Take a load off! Load testing your Oracle APEX or JDeveloper web applicationsSage Computing Services
 
Transformations - how Oracle rewrites your statements
Transformations - how Oracle rewrites your statementsTransformations - how Oracle rewrites your statements
Transformations - how Oracle rewrites your statementsSage Computing Services
 
Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...Sage Computing Services
 
Common Coding and Design mistakes (that really mess up performance)
Common Coding and Design mistakes (that really mess up performance)Common Coding and Design mistakes (that really mess up performance)
Common Coding and Design mistakes (that really mess up performance)Sage Computing Services
 
Oracle Discoverer is dead - Where to next for BI?
Oracle Discoverer is dead - Where to next for BI?Oracle Discoverer is dead - Where to next for BI?
Oracle Discoverer is dead - Where to next for BI?Sage Computing Services
 

Más de Sage Computing Services (17)

Oracle XML DB - What's in it for me?
Oracle XML DB - What's in it for me?Oracle XML DB - What's in it for me?
Oracle XML DB - What's in it for me?
 
Aspects of 10 Tuning
Aspects of 10 TuningAspects of 10 Tuning
Aspects of 10 Tuning
 
Bind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning NightmareBind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning Nightmare
 
Results cache
Results cacheResults cache
Results cache
 
Vpd
VpdVpd
Vpd
 
Whose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problemsWhose fault is it? - a review of application tuning problems
Whose fault is it? - a review of application tuning problems
 
New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...
 
Lost without a trace
Lost without a traceLost without a trace
Lost without a trace
 
How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?
 
Meet the CBO in Version 11g
Meet the CBO in Version 11gMeet the CBO in Version 11g
Meet the CBO in Version 11g
 
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
Take a load off! Load testing your Oracle APEX or JDeveloper web applicationsTake a load off! Load testing your Oracle APEX or JDeveloper web applications
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
 
The Cost Based Optimiser in 11gR2
The Cost Based Optimiser in 11gR2The Cost Based Optimiser in 11gR2
The Cost Based Optimiser in 11gR2
 
Transformations - how Oracle rewrites your statements
Transformations - how Oracle rewrites your statementsTransformations - how Oracle rewrites your statements
Transformations - how Oracle rewrites your statements
 
Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...
 
OHarmony - How the Optimiser works
OHarmony - How the Optimiser worksOHarmony - How the Optimiser works
OHarmony - How the Optimiser works
 
Common Coding and Design mistakes (that really mess up performance)
Common Coding and Design mistakes (that really mess up performance)Common Coding and Design mistakes (that really mess up performance)
Common Coding and Design mistakes (that really mess up performance)
 
Oracle Discoverer is dead - Where to next for BI?
Oracle Discoverer is dead - Where to next for BI?Oracle Discoverer is dead - Where to next for BI?
Oracle Discoverer is dead - Where to next for BI?
 

Último

React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 

Último (20)

React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 

Back to basics: Simple database web services without the need for SOA

  • 1. Back to Basics: Simple Database Web Services SAGE Computing Services Customised Oracle Training Workshops and Consulting Chris Muir Oracle Consultant and Trainer ♠ Oracle ACE Director - Fusion Middleware http://one-size-doesnt-fit-all.blogspot.com
  • 2. Photo thanks to spackletoe @ Flickr.com under CC
  • 3. Agenda • Part I: Understanding web services • Part II: Consuming web services from the database • Part III: Publishing web services from 11g
  • 4. Agenda • Part I: Understanding web services • Part II: Consuming web services from the database • Part III: Publishing web services from 11g
  • 5. Agenda • Part I: Understanding web services • Part II: Consuming web services from the database • Part III: Publishing web services from 11g
  • 6. Part I: Understanding Web Services SOAP, WSDL, RPC Style, Document Style, XML, XML Namespaces, HTTP request/response . ... blah blah blah Photo thanks to dalvenjah @ Flickr.com under CC
  • 7. Photo thanks to B.G. - Oodwin & Andrea Fregnani @ Flickr.com under CC SOAP vs REST Web Services
  • 8. SOAP Web Services Defined Host: http://www.sagecomputing.com.au Web Web Service /bookings /employees /timesheets Internet HTTP Request/Response Endpoints Server Web Service Web Service
  • 9. SOAP Web Services Defined Endpoint: http://www.sagecomputing.com.au/employees Web Service Employees getAddress getName updateAddress XML Namespace: http://www.sagecomputing.com.au/emp Operation Operation Operation Uniquely identified in an XML Namespace
  • 10. SOAP Web Service API Styles: 1.Remote Procedure Call (RPC) 2.Document Photo thanks to Phil Romans@ Flickr.com under CC
  • 11. Remote Procedure Call (RPC) Style Host: http://www.sagecomputing.com.au Endpoint: http://www.sagecomputing.com.au/employees Namespace: http://www.sagecomputing.com.au/emp Operation: getName In: integer employeeNumber Return: string name In: string nameCase http://www.w3.org/2001/XMLSchema Request: <sage:getName xmlns:sage="http://www.sagecomputing.com.au/emp"> <employeeNumber>1234</employeeNumber> <nameCase>U</nameCase> </sage:getName> Response: <sage:getName xmlns:sage="http://www.sagecomputing.com.au/emp"> <name>CHRISTOPHER MUIR</name> </sage:getName> Photo thanks to redjar @ Flickr.com under CC
  • 12. Remote Procedure Call (RPC) Style Request: <sage:getName xmlns:sage="http://www.sagecomputing.com.au/emp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"> <employeeNumber xsi:type="xsd:integer">1234</employeeNumber> <nameCase xsi:type="xsd:string">L</nameCase> </sage:getName> Photo thanks to redjar @ Flickr.com under CC Response: <sage:getName xmlns:sage="http:// www.sagecomputing.com.au/emp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"> <name xsi:type="xsd:string">christopher muir</name> </sage:getName>
  • 13. Document Style Host: http://www.sagecomputing.com.au Endpoint: http://www.sagecomputing.com.au/employees Namespace: http://www.sagecomputing.com.au/emp Operation: getName In: XML-Schema getNameInput Return: XML-Schema getNameOutput Photo thanks to ARS
  • 14. <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema targetNamespace="http://www.sagecomputing.com.au/emp"> <xsd:element name="getNameInput"> <xsd:complexType> <xsd:sequence> <xsd:element name="employeeNumber" type="xsd:integer"/> <xsd:element name="nameCase" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> Document Style "In" XML Schema XML Schema: Photo thanks to redjar @ Flickr.com under CC Request: <sage:getNameInput xmlns:sage="http://www.sagecomputing.com.au/emp"> <employeeNumber>1234</employeeNumber> <nameCase>M</nameCase> </sage:getNameInput>
  • 15. <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema targetNamespace="http://www.sagecomputing.com.au/emp"> <xsd:element name="getNameInput"> <xsd:complexType> <xsd:sequence> <xsd:element name="employeeNumber" type="xsd:integer"/> <xsd:element name="nameCase" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="getNameOutput" type="xsd:string"/> </xsd:schema> Document Style "In + Return" XML Schema XML Schema: Photo thanks to redjar @ Flickr.com under CC Response: <sage:getNameOutput xmlns:sage="http://www.sagecomputing.com.au/emp"> Christopher Muir</sage:getNameOutput>
  • 16. SOAP Envelope Request: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header/> <soap:Body> ... Request XML payload ... </soap:Body> </soap:Envelope> Response: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> ... Response XML payload ... </env:Body> </env:Envelope>
  • 17. Web Service Description Language (WSDL) Photo thanks to redjar @ Flickr.com under CC • De facto standard for describing web services • XML based + W3C standards based • Publish web service API http://www.sagecomputing.com.au/employees?wsdl • Assists consumer in assembling request • Not actually required in web service calls • Port types = grouped operations • Bindings = data exchange protocol (eg. SOAP over HTTP) • Ports = endpoints/services
  • 19. 01 <?xml version="1.0" encoding="UTF-8" ?> 02 <definitions targetNamespace="http://www.sagecomputing.com.au/emp" 03 xmlns="http://schemas.xmlsoap.org/wsdl/" 04 xmlns:sage="http://www.sagecomputing.com.au/emp" 05 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 06 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 07 <types/> 08 <message name="getNameInput"> 09 <part name="employeeNumber" type="xsd:int"/> 10 <part name="nameCase" type="xsd:string"/> 11 </message> 12 <message name="getNameOutput"><part name="name" type="xsd:string"/></message> 13 <portType name="employees"> 14 <operation name="getName" parameterOrder="employeeNumber nameCase"> 15 <input message="sage:getNameInput"/> 16 <output message="sage:getNameOutput"/> 17 </operation></portType> 18 <binding name="empSoapHttp" type="sage:employees"> 19 <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> 20 <operation name="getName"> 21 <input><soap:body use="literal" namespace="http://www.sagecomputing.com.au/emp" 22 parts="employeeNumber nameCase"/></input> 23 <output><soap:body use="literal" namespace="http://www.sagecomputing.com.au/emp" 24 parts="name"/></output> 25 </operation></binding> 26 <service name="employees"> 27 <port name="empSoapHttpPort" binding="sage:empSoapHttp"> 28 <soap:address location="http://www.sagecomputing.com.au/employees"/> 29 </port> 30 </service> 31 </definitions>
  • 20. Photo thanks to Dominic@ Flickr.com under CC Part II: Consuming Web Services from the Database utl_http utl_dbws
  • 21. Consuming Web Services from the Database • Database provides 2 packages for accessing web services – utl_http – low level http assembler – utl_dbws – high level web service package • 3rd (alternative) method: – Load Apache Common's Java HttpClient into db – Write Java program in db – Generate PL/SQL wrapper
  • 22. utl_http • Available as of 8.0.5 • Send/receive raw HTTP request/responses to external servers • Advantages: – Simplistic – Installed (completely) in the database – Passed and returns a VARCHAR2 XML payload – Very easy if you know the XML payload structures – Doesn't require a WSDL at publisher's site – Good examples available on the internet – 3rd party PL/SQL wrappers available (Tim Hall: soap_api) • Disadvantages: – Low level with no smarts to support web services – Cryptic HTTP error messages – Oracle documentation is less than useful
  • 24. 01 PROCEDURE call_web_service(i_payload IN VARCHAR2, o_response OUT VARCHAR2) IS 02 v_http_req utl_http.req; 03 v_http_resp utl_http.resp; 04 v_part_response VARCHAR2(32767); 04 BEGIN 05 utl_http.set_proxy('cmuir:pwd@proxy.sagecomputing.com.au:80 '); 06 utl_http.set_wallet('file:/oracle/owallets/', 'pwd'); 07 08 v_http_req := utl_http.begin_request( 09 'http://www.sagecomputing.com.au/employees', 'POST', 'HTTP/1.1'); 10 utl_http.set_authentication(v_http_req, 'cmuir', 'pwd', 'Basic', TRUE); 11 12 utl_http.set_header(v_http_req, 'Content-Type' ,'text/xml'); 13 utl_http.set_header(v_http_req, 'Content-Length' ,length(i_payload)); 14 utl_http.set_header(v_http_req, 'SOAPAction' ,'getName'); 15 16 utl_http.write_text(v_http_req, i_payload); 17 18 v_http_resp := utl_http.get_response(v_http_req); 19 -- Add handler for HTTP error v_http_resp.status_code >= 500 <= 599 20 BEGIN 21 LOOP 22 utl_http.read_text(v_http_resp, v_part_response); 23 o_response := o_response || v_part_response; 24 END LOOP; 25 EXCEPTION WHEN utl_http.end_of_body THEN 26 NULL; 27 END; 28 utl_http.end_response(v_http_resp); 29 -- Add exception handler 30 END call_web_service;
  • 25. 01 DECLARE 02 v_request VARCHAR2(5000); 03 v_response VARCHAR2(5000); 04 05 v_soap_req VARCHAR2(5000); 06 v_soap_resp VARCHAR2(5000); 07 08 v_xml_resp XMLType; 09 10 BEGIN 11 v_request := '<sage:getNameInput xmlns:sage="http://www.sagecomputing.com.au/emp">' 12 || '<employeeNumber>1234</employeeNumber>' 13 || '<nameCase>M</nameCase>' 14 || '</sage:getNameInput>'; 15 16 v_soap_req := '<?xml version = "1.0" encoding = "UTF-8"?>' 17 || '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">' 18 || '<soapenv:Header/>' 19 || '<soapenv:Body>' 20 || v_request 21 || '</soapenv:Body>' 22 || '</soapenv:Envelope>'; 23 24 call_web_service(v_soap_req, v_soap_resp); 25 26 -- Strip the SOAP XML envelope from the response 27 v_xml_resp := XMLType.createXml(v_soap_resp); 28 v_response := v_xml_resp.extract( 29 '/soap:Envelope/soap:Body/child::node()' 30 ,'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"').getStringVal(); 31 32 END;
  • 26. Oracle 11g utl_http Security Caveats • New: Network Access Control Lists (ACLs) • Purpose: Fine grained host access • Affects: utl_tcp, utl_http, utl_smtp, utl_mail, utl_inaddr • Documentation: Oracle Database Security Guide 11gR1 Chapter 4 • Simple Workaround: Metalink Note 453786.1 Photo thanks to |m Le' chArt @ Flickr.com under CC
  • 27. utl_dbws • Available as of 10gR1 • PL/SQL Java wrapper on oracle.jpub.runtime.dbws.DbwsProxy • Part of JPublisher • Advantages: – High(er) level web service handler • Disadvantages: – Not completely installed by default (bah!) – Poor error reporting (in particular HTTP) – Queries external WSDL each request – Oracle documentation is dismal – Use of HttpUriType does not support wallets or proxies – Minor bugs in 10gR2 version with external authentication – Minor issues on calling .Net web services – Uses database JVM
  • 28. • Source: Tim Hall's blog http://www.oracle-base.com/articles/10g/utl_dbws10g.php Download: http://download.oracle.com/technology/sample_code/ tech/java/jsp/dbws-callout-utility-10131.zip Extract: dbwsclientws.jar + dbwsclientdb11.jar -> ORACLE_HOME/sqlj/lib Execute: ORACLE_HOME/sql/lib/loadjava -u sys/password -r -v -f -genmissing -s -grant public dbwsclientws.jar dbwsclientdb11.jar utl_dbws Installation Photo thanks to cervus @ Flickr.com under CC • Slow to install & will produce class loading errors at end • Consider reinstalling in separate schema from sys as per Metalink note: 469588.1
  • 30. 01 DECLARE 02 v_namespace VARCHAR2(1000) := 'http://www.sagecomputing.com.au/emp'; 03 v_service_qname utl_dbws.qname := utl_dbws.to_qname(v_namespace,'employees'); 04 v_port_qname utl_dbws.qname := utl_dbws.to_qname(v_namespace,'employeesSoapHttpPort'); 05 v_operation_qname utl_dbws.qname := utl_dbws.to_qname(v_namespace,'getName'); 06 07 v_service utl_dbws.service; 08 v_call utl_dbws.call; 09 10 v_int_type utl_dbws.qname; 11 v_string_type utl_dbws.qname; 12 13 v_request_params utl_dbws.anydata_list; -- RPC style only 14 v_response_anydata AnyData; -- RPC style only 15 16 v_request_xmltype XmlType; -- Document style only 17 v_response_xmltype XmlType; -- Document style only 18 19 BEGIN 20 v_service := utl_dbws.create_service( 21 HttpUriType('http://www.sage.com.au/employees?wsdl'), v_service_qname); 22 23 v_call := utl_dbws.create_call(v_service, v_port_qname, v_operation_qname); 24 25 utl_dbws.set_property(v_call, 'SOAPACTION_USE', 'TRUE'); 26 utl_dbws.set_property(v_call, 'SOAPACTION_URI', 'getName'); 27 utl_dbws.set_property(v_call, 'ENCODINGSTYLE_URI', 28 'http://schemas.xmlsoap.org/soap/encoding/'); 29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'rpc'); 29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'document'); Pick one
  • 31. 29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'rpc'); 30 31 v_int_type := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'int'); 32 v_string_type := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string'); 33 34 utl_dbws.add_parameter(v_call, 'employeeNumber', v_int_type, 'ParameterMode.IN'); 35 utl_dbws.add_parameter(v_call, 'nameCase', v_string_type, 'ParameterMode.IN'); 36 utl_dbws.set_return_type(v_call, v_string_type); 37 38 v_request_params(0) := AnyData.convertNumber(1234); 39 v_request_params(1) := AnyData.convertVarchar('M'); 40 41 v_response_anydata := utl_dbws.invoke(v_call, v_request_params); 42 dbms_output.put_line('Result = ' || v_response_anydata.accessVarchar2); 43 44 utl_dbws.release_call(v_call); 45 utl_dbws.release_service(v_service); 46 END; 47 / Result = Christopher Muir
  • 32. 29 utl_dbws.set_property(v_call, 'OPERATION_STYLE', 'document'); 30 31 v_string_type := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string'); 32 33 utl_dbws.add_parameter(v_call, 'Request', v_string_type, 'ParameterMode.IN'); 34 utl_dbws.set_return_type(v_call, v_string_type); 35 36 v_request_xmltype := XmlType('<?xml version="1.0" encoding="utf-8"?>' 37 || '<getNameInput xmlns="' || v_namespace || '">' 38 || '<employeeNumber>1234</employeeNumber>' 39 || '<nameCase>U</nameCase>' 40 || '</getNameInput>'); 41 42 v_response_xmltype := utl_dbws.invoke(v_call, v_request_xmltype); 43 44 dbms_output.put_line('Result = ' || v_response_xmltype.getStringVal()); 45 46 utl_dbws.release_call(v_call); 47 utl_dbws.release_service(v_service); 48 END; 49 / Result = <ns0:getNameOutput xmlns:ns0="http://www.sagecomputing.com.au/emp/">CHRISTOPHER MUIR</ns0:getNameOutput>
  • 33. Photo thanks to Nicki's Pix @ Flickr.com under CC
  • 34. Photo thanks to Daquella manera @ Flickr.com under CC
  • 35. Part III: Publishing Web Services from the Database Native Web Services Photo thanks to The Dilla Lama @ Flickr.com under CC
  • 36. 11g Native Web Services • Available as of RDBMS 11gR1 • Provided through Oracle XML DB feature set • Publishes: – SQL & XQuery query facility – Stored PL/SQL procedures and functions including packages • SOAP 1.1 compliant, WSDL automatically generated • Advantages: – Simple, no application server required • Disadvantages: – No control over WSDL naming conventions and payload structures – Security concerns as web services are exposed directly from database layer
  • 37. 11g Native Web Services Installation Photo thanks to makelessnoise @ Flickr.com under CC
  • 38. Native PL/SQL Web Services • Publish any procedure, function or package module • Support for parameters using most primitive datatypes and object types, not %rowtype • Endpoint format: http://<host>:<port>/orawsv/<schema>/<methodname> http://<host>:<port>/orawsv/<schema>/<package>/<methodname> • WSDL format: http://<host>:<port>/orawsv/<schema>/<methodname>?wsdl http://<host>:<port>/orawsv/<schema>/<package>/<methodname>?wsdl • Example: http://www.sagecomputing.com.au:8080/orawsv/SAGE/TEST?wsdl • Schema/package/module names must match database case name • Requires HTTP basic authentication with schema username/pwd
  • 39. Native PL/SQL Web Service "Example" FUNCTION get_name(employeeNumber IN NUMBER, nameCase IN VARCHAR2) RETURN VARCHAR2 AS CURSOR c_name IS SELECT decode(nameCase,'U',upper(name),'L',lower(name),initcap(name)) name FROM employees WHERE emp_no = employeeNumber; v_name VARCHAR2(100); BEGIN OPEN c_name; FETCH c_name INTO v_name; CLOSE c_name; RETURN v_name; END get_name;
  • 40. Native PL/SQL Web Service "Request" Request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://xmlns.oracle.com/orawsv/SAGE/GET_NAME"> <soapenv:Header/> <soapenv:Body> <get:SVARCHAR2-GET_NAMEInput> <get:EMPLOYEENUMBER-NUMBER-IN>1234</get:EMPLOYEENUMBER-NUMBER-IN> <get:NAMECASE-VARCHAR2-IN>U</get:NAMECASE-VARCHAR2-IN> </get:SVARCHAR2-GET_NAMEInput> </soapenv:Body> </soapenv:Envelope>
  • 41. Native PL/SQL Web Service "Response" Response <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GET_NAMEOutput xmlns="http://xmlns.oracle.com/orawsv/SAGE/GET_NAME"> <RETURN>CHRISTOPHER MUIR</RETURN> </GET_NAMEOutput> </soap:Body> </soap:Envelope>
  • 42. Native Query Web Services • Queries & DML supported on any objects accessible via schema • Endpoint format: http://<host>:<port>/orawsv • WSDL format: http://<host>:<port>/orawsv?wsdl • Example: http://www.sagecomputing.com.au:8080/orawsv?wsdl • Requires HTTP basic authentication with schema username/pwd • Takes a basic SQL string with bind parameters • Returns XML structure containing data • Number of parameters to influence result
  • 43. Native Query Web Service "Request" Request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oraw="http://xmlns.oracle.com/orawsv"> <soapenv:Header/> <soapenv:Body> <oraw:query> <oraw:query_text type="SQL"> <![CDATA[SELECT * FROM employees WHERE emp_id = :vEmpId]]> </oraw:query_text> <oraw:bind name="vEmpId">1234</oraw:bind> </oraw:query> </soapenv:Body> </soapenv:Envelope>
  • 44. Native Query Web Service "Response" Response <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <queryOut xmlns="http://xmlns.oracle.com/orawsv"> <ROWSET> <ROW> <EMP_ID>1234</EMP_ID> <NAME>Christoper Muir</NAME> </ROW> </ROWSET> </queryOut> </soap:Body> </soap:Envelope>
  • 46. SAGE Computing Services Customised Oracle Training Workshops and Consulting Questions and Answers? Presentations are available from our website: www.sagecomputing.com.au enquiries@sagecomputing.com.au chris.muir@sagecomputing.com.au http://one-size-doesnt-fit-all.blogspot.com
  • 47. utl_http References Tim Hall's blog http://www.oracle- base.com/articles/9i/ConsumingWebServices9i.php http://www.oracle-base.com/dba/Script.php?category= miscellaneous&file=soap_api.sql Oracle documentation http://download.oracle.com/docs/cd/B28359_01/appdev.111/b2 8419/u_http.htm#CHDIAFFA
  • 48. utl_dbws References Tim Hall's blog http://www.oracle-base.com/articles/10g/utl_dbws10g.php Marc Kelderman's blog http://orasoa.blogspot.com/2006/11/calling-bpel-process- with-utldbws.html Stellan's blog http://www.selectedthoughts.com/2007/04/problems-calling- net-web-services-from.html Henry Cortez on the OraFAQ forum http://www.orafaq.com/forum/t/99528/0/ Oracle 10g documentation http://download.oracle.com/docs/cd/B19306_01/appdev.102/b1 4258/u_dbws.htm#i1001769
  • 49. Native Web Services References Tim Hall's blog http://www.oracle-base.com/articles/11g/ NativeOracleXmlDbWebServices_11gR1.php Paul Gallagher's blog http://tardate.blogspot.com/2007/08/first-tests-of-11g- native-web-services.html Marc Thompson's blog http://marc-on-oracle.blogspot.com/2007/12/11g-database- installation-and-native.html Oracle 11g documentation http://download.oracle.com/docs/cd/B28359_01/appdev.111/b2 8369/xdb_web_services.htm