Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Raastech, Inc.
2201 Cooperative Way, Suite 600
Herndon, VA 20171
+1-703-884-2223
info@raastech.com
Understanding and Devel...
© Raastech, Inc. 2015 | All rights reserved. Slide 2 of 61@Raastech
Agenda
1. Introduction
2. Introducing Web Services
3. ...
© Raastech, Inc. 2015 | All rights reserved. Slide 3 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 4 of 61@Raastech
About Us
 Ahmed Aboulnaga @Ahmed_Aboulnaga
 18+ year...
© Raastech, Inc. 2015 | All rights reserved. Slide 5 of 61@Raastech
About Raastech
 Small systems integrator founded in 2...
© Raastech, Inc. 2015 | All rights reserved. Slide 6 of 61@Raastech
Why This Presentation
 Learn to develop a web service...
© Raastech, Inc. 2015 | All rights reserved. Slide 7 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 8 of 61@Raastech
Custom Drivers
 How application access was previously...
© Raastech, Inc. 2015 | All rights reserved. Slide 9 of 61@Raastech
Specific Target Implementation
 ProC anyone?
 Must b...
© Raastech, Inc. 2015 | All rights reserved. Slide 10 of 61@Raastech
SOAP over HTTP
 Standardization on SOAP over HTTP
We...
© Raastech, Inc. 2015 | All rights reserved. Slide 11 of 61@Raastech
Agnostic Target Implementation
 No need to worry abo...
© Raastech, Inc. 2015 | All rights reserved. Slide 12 of 61@Raastech
PL/SQL Samples
CREATE PROCEDURE getWeather (
zipcode ...
© Raastech, Inc. 2015 | All rights reserved. Slide 13 of 61@Raastech
Synchronous vs. Asynchronous
PL/SQL
Procedure
PL/SQL
...
© Raastech, Inc. 2015 | All rights reserved. Slide 14 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 15 of 61@Raastech
Web Service Clients
 Now that business functionality...
© Raastech, Inc. 2015 | All rights reserved. Slide 16 of 61@Raastech
SoapUI
© Raastech, Inc. 2015 | All rights reserved. Slide 17 of 61@Raastech
Accessing a WSDL
 The web service interface is acces...
© Raastech, Inc. 2015 | All rights reserved. Slide 18 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 19 of 61@Raastech
Dissecting a WSDL: Interface
<definitions name="Weath...
© Raastech, Inc. 2015 | All rights reserved. Slide 20 of 61@Raastech
<definitions name="Weather">
<types>
<schema>
<elemen...
© Raastech, Inc. 2015 | All rights reserved. Slide 21 of 61@Raastech
<definitions name="Weather">
<types>
<schema>
<elemen...
© Raastech, Inc. 2015 | All rights reserved. Slide 22 of 61@Raastech
<definitions name="Weather">
<types>
<schema>
<elemen...
© Raastech, Inc. 2015 | All rights reserved. Slide 23 of 61@Raastech
JavaBPEL
Today’s Live Development Demo
getWeatherSoap...
© Raastech, Inc. 2015 | All rights reserved. Slide 24 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 25 of 61@Raastech
w3schools References
 http://www.w3schools.com/xml/d...
© Raastech, Inc. 2015 | All rights reserved. Slide 26 of 61@Raastech
 XML stands for “EXtensible Markup Language”.
 XML ...
© Raastech, Inc. 2015 | All rights reserved. Slide 27 of 61@Raastech
 XML documents follow a tree structure.
 Every XML ...
© Raastech, Inc. 2015 | All rights reserved. Slide 28 of 61@Raastech
 Comments
<Customer>
<!-- this is a comment -->
<Nam...
© Raastech, Inc. 2015 | All rights reserved. Slide 29 of 61@Raastech
 XML documents must have open and close tags.
 Vali...
© Raastech, Inc. 2015 | All rights reserved. Slide 30 of 61@Raastech
 Open and close tags must have matching case
 Valid...
© Raastech, Inc. 2015 | All rights reserved. Slide 31 of 61@Raastech
 XML elements must be properly nested
 Valid HTML, ...
© Raastech, Inc. 2015 | All rights reserved. Slide 32 of 61@Raastech
 Entity reference.
&lt; < less than
&gt; > greater t...
© Raastech, Inc. 2015 | All rights reserved. Slide 33 of 61@Raastech
 Unlike HTML, whitespace is preserved in XML.
<Custo...
© Raastech, Inc. 2015 | All rights reserved. Slide 34 of 61@Raastech
 Attributes
<Customer OrderNumber="61237">
<Items>
<...
© Raastech, Inc. 2015 | All rights reserved. Slide 35 of 61@Raastech
 Should you use elements or attributes when designin...
© Raastech, Inc. 2015 | All rights reserved. Slide 36 of 61@Raastech
 Namespaces are identifiers
<Customers>
<e:Customer ...
© Raastech, Inc. 2015 | All rights reserved. Slide 37 of 61@Raastech
 Default namespace; no need to prefix all child elem...
© Raastech, Inc. 2015 | All rights reserved. Slide 38 of 61@Raastech
 XML Schema defines elements in an XML document.
 X...
© Raastech, Inc. 2015 | All rights reserved. Slide 39 of 61@Raastech
 XML Schemas are well-formed XML documents and are
e...
© Raastech, Inc. 2015 | All rights reserved. Slide 40 of 61@Raastech
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www...
© Raastech, Inc. 2015 | All rights reserved. Slide 41 of 61@Raastech
 A simple element contains only plain text that can ...
© Raastech, Inc. 2015 | All rights reserved. Slide 42 of 61@Raastech
 String
<someelement>Hello World</someelement>
 Dec...
© Raastech, Inc. 2015 | All rights reserved. Slide 43 of 61@Raastech
 Date
<someelement>2002-09-24Z</someelement>
<someel...
© Raastech, Inc. 2015 | All rights reserved. Slide 44 of 61@Raastech
 Restrictions are also referred to as facets.
 Exam...
© Raastech, Inc. 2015 | All rights reserved. Slide 45 of 61@Raastech
 Complex elements are XML elements that contains oth...
© Raastech, Inc. 2015 | All rights reserved. Slide 46 of 61@Raastech
 SOAP stands for “Simple Object Access Protocol”.
 ...
© Raastech, Inc. 2015 | All rights reserved. Slide 47 of 61@Raastech
 Example:
<?xml version="1.0"?>
<soap:Envelope xmlns...
© Raastech, Inc. 2015 | All rights reserved. Slide 48 of 61@Raastech
 Envelope
 Root element of a SOAP message.
 xmlns:...
© Raastech, Inc. 2015 | All rights reserved. Slide 49 of 61@Raastech
 WSDL stands for “Web Services Description Language”...
© Raastech, Inc. 2015 | All rights reserved. Slide 50 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 51 of 61@Raastech
Java Web Service Development: Top-Down Approach
 A t...
© Raastech, Inc. 2015 | All rights reserved. Slide 52 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 53 of 61@Raastech
Java Web Service Development: Bottom-Up Approach
 A ...
© Raastech, Inc. 2015 | All rights reserved. Slide 54 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 55 of 61@Raastech
BPEL Web Service Development
 Live Development Demo
© Raastech, Inc. 2015 | All rights reserved. Slide 56 of 61@Raastech
© Raastech, Inc. 2015 | All rights reserved. Slide 57 of 61@Raastech
SOAP vs. REST
{
"Customer":
{
"FirstName":"John",
"La...
© Raastech, Inc. 2015 | All rights reserved. Slide 58 of 61@Raastech
SOAP vs. REST
 http://www.ateam-oracle.com/performan...
© Raastech, Inc. 2015 | All rights reserved. Slide 59 of 61@Raastech
Recap
 Why has web services become the accepted stan...
© Raastech, Inc. 2015 | All rights reserved. Slide 60 of 61@Raastech
Contact Information
 Ahmed Aboulnaga
 Technical Dir...
© Raastech, Inc. 2015 | All rights reserved. Slide 61 of 61@Raastech
Q&A
Upcoming SlideShare
Loading in …5
×

Understanding and Developing Web Services - For DBAs and Developers

360 views

Published on

WSDL. XSD. SOAP. Namespaces. Port types. If these terms make little sense, this presentation is for you. By the end of this presentation, you will completely understand how to dissect and decipher a web service interface, understand key design patterns, and learn how to develop top-down and bottom-up web services in technologies such as Java and Oracle SOA Suite. Presented by Ahmed Aboulnaga (Oracle ACE) and Harold Dost (Oracle ACE Associate), this presentation is intended for developers and DBAs who want to know what it takes to design and develop web services.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Understanding and Developing Web Services - For DBAs and Developers

  1. 1. Raastech, Inc. 2201 Cooperative Way, Suite 600 Herndon, VA 20171 +1-703-884-2223 info@raastech.com Understanding and Developing Web Services For DBAs and Developers Session 467 Wednesday April 15,2015 4:30 - 5:30 pm Room Banyan C
  2. 2. © Raastech, Inc. 2015 | All rights reserved. Slide 2 of 61@Raastech Agenda 1. Introduction 2. Introducing Web Services 3. Accessing a Web Service 4. Anatomy of a WSDL 5. Getting Started: Concepts 6. Live Development Demo  Java Web Service: Top-Down Development  Java Web Service: Bottom-Up Development  BPEL Web Service 7. Recap & Summary
  3. 3. © Raastech, Inc. 2015 | All rights reserved. Slide 3 of 61@Raastech
  4. 4. © Raastech, Inc. 2015 | All rights reserved. Slide 4 of 61@Raastech About Us  Ahmed Aboulnaga @Ahmed_Aboulnaga  18+ years Oracle experience  Author of “Oracle SOA Suite 11g Administrator’s Handbook”  OCE (SOA Foundation Practitioner)  Oracle ACE .
  5. 5. © Raastech, Inc. 2015 | All rights reserved. Slide 5 of 61@Raastech About Raastech  Small systems integrator founded in 2009  Headquartered in the Washington DC area  Specializes in Oracle Fusion Middleware  Oracle Platinum Partner & Reseller  Oracle SOA Specialized  100% of consultants are Oracle certified  100% of consultants present at major Oracle conferences  100% of consultants have published books, whitepapers, or articles  Oracle SOA Specialized – 1 in 1,500 worldwide  Oracle Platinum Partner – 1 in 3,000 worldwide
  6. 6. © Raastech, Inc. 2015 | All rights reserved. Slide 6 of 61@Raastech Why This Presentation  Learn to develop a web service from scratch  Lot of PL/SQL developers are intimidated by SOA development  Presentation is specific to SOAP, but concepts are similar for REST
  7. 7. © Raastech, Inc. 2015 | All rights reserved. Slide 7 of 61@Raastech
  8. 8. © Raastech, Inc. 2015 | All rights reserved. Slide 8 of 61@Raastech Custom Drivers  How application access was previously developed PL/SQL ProcedurePL/SQL Procedure SQL Developer Java Application .NET Application ODBC driver JDBC driver SQL*NET (internal)
  9. 9. © Raastech, Inc. 2015 | All rights reserved. Slide 9 of 61@Raastech Specific Target Implementation  ProC anyone?  Must be aware of the technology of the target system implementation and import the necessary libraries and drivers compatible with that technology PL/SQL ApplicationJava Application Java Application .NET Application .NET JARs Java API JDBC drive
  10. 10. © Raastech, Inc. 2015 | All rights reserved. Slide 10 of 61@Raastech SOAP over HTTP  Standardization on SOAP over HTTP Web ServiceAny Application Java Application .NET Application SOAP over HTTP SOAP over HTTP SOAP over HTTP
  11. 11. © Raastech, Inc. 2015 | All rights reserved. Slide 11 of 61@Raastech Agnostic Target Implementation  No need to worry about implementation technology of target applications AWS Java Application SalesForce Intuit SOAP over HTTP SOAP over HTTP SOAP over HTTP
  12. 12. © Raastech, Inc. 2015 | All rights reserved. Slide 12 of 61@Raastech PL/SQL Samples CREATE PROCEDURE getWeather ( zipcode IN VARCHAR2, temperature OUT NUMBER) IS BEGIN temperature := '35'; END; CREATE PROCEDURE setWeather ( zipcode IN VARCHAR2, temperature IN NUMBER) IS BEGIN INSERT INTO weather VALUES (zipcode, temperature); END; Request-Response Synchronous 1-way Asynchronous
  13. 13. © Raastech, Inc. 2015 | All rights reserved. Slide 13 of 61@Raastech Synchronous vs. Asynchronous PL/SQL Procedure PL/SQL Procedure PL/SQL Procedure PL/SQL Procedure
  14. 14. © Raastech, Inc. 2015 | All rights reserved. Slide 14 of 61@Raastech
  15. 15. © Raastech, Inc. 2015 | All rights reserved. Slide 15 of 61@Raastech Web Service Clients  Now that business functionality is exposed as web services, these services need to be consumed somehow.  Since web services are standards based, they can be invoked via the majority of programming languages or through other services.
  16. 16. © Raastech, Inc. 2015 | All rights reserved. Slide 16 of 61@Raastech SoapUI
  17. 17. © Raastech, Inc. 2015 | All rights reserved. Slide 17 of 61@Raastech Accessing a WSDL  The web service interface is accessible via an HTTP URL: http://admin.packt.com:7001/Packt-GetWeather-context-root/WeatherPort?WSDL  The web service implementation may or may not reside on the same service: <soap:address location="http://srv.packt.com:8888/Packt-GetWeather-context- root/WeatherPort"/>  Often impossible to tell what underlying language was used to create the web service.
  18. 18. © Raastech, Inc. 2015 | All rights reserved. Slide 18 of 61@Raastech
  19. 19. © Raastech, Inc. 2015 | All rights reserved. Slide 19 of 61@Raastech Dissecting a WSDL: Interface <definitions name="Weather"> <types> <schema> <element name="zip" type="string"/> <element name="temp" type="string"/> </schema> </types> <message name="zipReq"><part name="parameters" element="zip"/></message> <message name="tempResp"><part name="parameters" element="temp"/></message> <portType name="WeatherPort"> <operation name="getWeather"> <input message="zipReq"/> <output message="tempResp"/> </operation> </portType> <binding name="WeatherBinding" type="WeatherPort"> <operation name="getWeather"> <input name="zipReq"/> <output name="tempResp"/> </operation> </binding> <service name="WeatherService"> <port name="WeatherPort" binding="WeatherBinding"> <soap:address location="http://localhost/wc/weather"/> </port> </service> </definitions> The WSDL is the interface to the web service. Implementation details of the web service is unknown.
  20. 20. © Raastech, Inc. 2015 | All rights reserved. Slide 20 of 61@Raastech <definitions name="Weather"> <types> <schema> <element name="zip" type="string"/> <element name="temp" type="string"/> </schema> </types> <message name="zipReq"><part name="parameters" element="zip"/></message> <message name="tempResp"><part name="parameters" element="temp"/></message> <portType name="WeatherPort"> <operation name="getWeather"> <input message="zipReq"/> <output message="tempResp"/> </operation> </portType> <binding name="WeatherBinding" type="WeatherPort"> <operation name="getWeather"> <input name="zipReq"/> <output name="tempResp"/> </operation> </binding> <service name="WeatherService"> <port name="WeatherPort" binding="WeatherBinding"> <soap:address location="http://localhost/wc/weather"/> </port> </service> </definitions> Dissecting a WSDL: Endpoints Location is referred to as the “endpoint”. Identifies where the actual code resides.
  21. 21. © Raastech, Inc. 2015 | All rights reserved. Slide 21 of 61@Raastech <definitions name="Weather"> <types> <schema> <element name="zip" type="string"/> <element name="temp" type="string"/> </schema> </types> <message name="zipReq"><part name="parameters" element="zip"/></message> <message name="tempResp"><part name="parameters" element="temp"/></message> <portType name="WeatherPort"> <operation name="getWeather"> <input message="zipReq"/> <output message="tempResp"/> </operation> </portType> <binding name="WeatherBinding" type="WeatherPort"> <operation name="getWeather"> <input name="zipReq"/> <output name="tempResp"/> </operation> </binding> <service name="WeatherService"> <port name="WeatherPort" binding="WeatherBinding"> <soap:address location="http://localhost/wc/weather"/> </port> </service> </definitions> Dissecting a WSDL: Operations This web service has a single operation, with an input and an output (i.e., synchronous).
  22. 22. © Raastech, Inc. 2015 | All rights reserved. Slide 22 of 61@Raastech <definitions name="Weather"> <types> <schema> <element name="zip" type="string"/> <element name="temp" type="string"/> </schema> </types> <message name="zipReq"><part name="parameters" element="zip"/></message> <message name="tempResp"><part name="parameters" element="temp"/></message> <portType name="WeatherPort"> <operation name="getWeather"> <input message="zipReq"/> <output message="tempResp"/> </operation> </portType> <binding name="WeatherBinding" type="WeatherPort"> <operation name="getWeather"> <input name="zipReq"/> <output name="tempResp"/> </operation> </binding> <service name="WeatherService"> <port name="WeatherPort" binding="WeatherBinding"> <soap:address location="http://localhost/wc/weather"/> </port> </service> </definitions> Dissecting a WSDL: Messages The type of the message is defined in the “schema”.
  23. 23. © Raastech, Inc. 2015 | All rights reserved. Slide 23 of 61@Raastech JavaBPEL Today’s Live Development Demo getWeatherSoapUI getWeatherSoapUI
  24. 24. © Raastech, Inc. 2015 | All rights reserved. Slide 24 of 61@Raastech
  25. 25. © Raastech, Inc. 2015 | All rights reserved. Slide 25 of 61@Raastech w3schools References  http://www.w3schools.com/xml/default.asp  http://www.w3schools.com/schema/default.asp  http://www.w3schools.com/xpath/default.asp  http://www.w3schools.com/xsl/default.asp  http://www.w3schools.com/xquery/default.asp  http://www.w3schools.com/webservices/default.asp  http://www.w3schools.com/webservices/ws_wsdl_intro.asp  http://www.w3schools.com/webservices/ws_soap_intro.asp  http://blog.raastech.com/2009/01/creating-top-down-java-web-service-for.html  http://blog.raastech.com/2009/03/creating-bottom-up-java-web-service-for.html
  26. 26. © Raastech, Inc. 2015 | All rights reserved. Slide 26 of 61@Raastech  XML stands for “EXtensible Markup Language”.  XML was designed to transport and store data.  XML is designed to be self-descriptive.  XML was originally designed to transport and store data.  XML does not contain any logic. Introduction to XML
  27. 27. © Raastech, Inc. 2015 | All rights reserved. Slide 27 of 61@Raastech  XML documents follow a tree structure.  Every XML document must have 1 root element.  The root element is the parent of all other elements. <Customer> <Name>John Doe</Name> <OrderNumber>61237</OrderNumber> <Items> <Item quantity="2">Book</Item> </Items> </Customer> XML Structure – Root Element
  28. 28. © Raastech, Inc. 2015 | All rights reserved. Slide 28 of 61@Raastech  Comments <Customer> <!-- this is a comment --> <Name>John Doe</Name> <OrderNumber>61237</OrderNumber> <Items> <Item quantity="2">Book</Item> </Items> </Customer> XML Structure – Comments
  29. 29. © Raastech, Inc. 2015 | All rights reserved. Slide 29 of 61@Raastech  XML documents must have open and close tags.  Valid HTML, but invalid XML: <li> XML is easy XML Structure – Tags
  30. 30. © Raastech, Inc. 2015 | All rights reserved. Slide 30 of 61@Raastech  Open and close tags must have matching case  Valid HTML, but invalid XML: <Customer>John Doe</customer> XML Structure – Tags
  31. 31. © Raastech, Inc. 2015 | All rights reserved. Slide 31 of 61@Raastech  XML elements must be properly nested  Valid HTML, but invalid XML: <b><u>Hello World</b><u> XML Structure – Tags
  32. 32. © Raastech, Inc. 2015 | All rights reserved. Slide 32 of 61@Raastech  Entity reference. &lt; < less than &gt; > greater than &amp; & ampersand &apos; ' apostrophe &quot; " quotation mark XML Structure – Entity Reference
  33. 33. © Raastech, Inc. 2015 | All rights reserved. Slide 33 of 61@Raastech  Unlike HTML, whitespace is preserved in XML. <Customer> <Name>John Doe is a person. His age is 20.</Name> </Customer> XML Structure – Whitespace
  34. 34. © Raastech, Inc. 2015 | All rights reserved. Slide 34 of 61@Raastech  Attributes <Customer OrderNumber="61237"> <Items> <Item quantity="2">Book</Item> <Item quantity="1">Binder</Item> </Items> </Customer> XML Structure – Attributes
  35. 35. © Raastech, Inc. 2015 | All rights reserved. Slide 35 of 61@Raastech  Should you use elements or attributes when designing XML documents? <Customer> <OrderNumber>61237</OrderNumber> <Items> <Item quantity="1">Binder</Item> </Items> </Customer> <Customer OrderNumber="61237"> <Items> <Item quantity="1">Binder</Item> </Items> </Customer> XML Structure – Attributes vs. Elements
  36. 36. © Raastech, Inc. 2015 | All rights reserved. Slide 36 of 61@Raastech  Namespaces are identifiers <Customers> <e:Customer xmlns:e="http://raastech.com/Employees"> <e:Name>John Doe</e:Name> </e:Customer> <p:Customer xmlns:p="http://raastech.com/Partners"> <p:Name>Jane Doe</p:Name> </p:Customer> <Customers> XML Structure – Namespaces
  37. 37. © Raastech, Inc. 2015 | All rights reserved. Slide 37 of 61@Raastech  Default namespace; no need to prefix all child elements. <Customer xmlns="http://raastech.com/Employees"> <Name>John Doe</Name> </Customer> XML Structure – Default Namespace
  38. 38. © Raastech, Inc. 2015 | All rights reserved. Slide 38 of 61@Raastech  XML Schema defines elements in an XML document.  XML Schema defines attributes in an XML document.  XML Schema defines child elements, and optionally their number and order.  XML Schema defines data types for both elements and attributes.  XML Schema defines default and fixed values for elements and attributes. Introduction to XML Schema
  39. 39. © Raastech, Inc. 2015 | All rights reserved. Slide 39 of 61@Raastech  XML Schemas are well-formed XML documents and are extensible.  They are typically saved as .xsd files.  The root element of every XML Schema is the <schema> element.  The <schema> element may include attributes such as the XML namespace. Introduction to XML Schema
  40. 40. © Raastech, Inc. 2015 | All rights reserved. Slide 40 of 61@Raastech <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="Customer"> <xs:complexType> <xs:sequence> <xs:element name="OrderNumber" type="xs:string"/> <xs:element name="Name" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Example of an XML Schema
  41. 41. © Raastech, Inc. 2015 | All rights reserved. Slide 41 of 61@Raastech  A simple element contains only plain text that can be defined in one of several predefined data types (or custom types).  The predefined data types in XML Schema include:  string  decimal  integer  boolean  date  time Simple Element
  42. 42. © Raastech, Inc. 2015 | All rights reserved. Slide 42 of 61@Raastech  String <someelement>Hello World</someelement>  Decimal <someelement>12.50</someelement>  Integer <someelement>12</someelement>  Boolean <someelement>true</someelement> Data Types
  43. 43. © Raastech, Inc. 2015 | All rights reserved. Slide 43 of 61@Raastech  Date <someelement>2002-09-24Z</someelement> <someelement>2008-07-24-06:00</someelement>  Time: <someelement>08:00:00</someelement>  DateTime: <someelement>2008-07-24T08:00:00</someelement> Data Types
  44. 44. © Raastech, Inc. 2015 | All rights reserved. Slide 44 of 61@Raastech  Restrictions are also referred to as facets.  Examples include:  minInclusive  maxInclusive  Enumeration  fractionDigits  Length  maxInclusive  maxExclusive  maxLength  minLength  totalDigits Restrictions
  45. 45. © Raastech, Inc. 2015 | All rights reserved. Slide 45 of 61@Raastech  Complex elements are XML elements that contains other elements or attributes. <xs:element name="Customer"> <xs:complexType> <xs:sequence> <xs:element name="Name" type="xs:string"/> <xs:element name="Item" type="xs:ItemType" minOccurs="1" maxOccurs="5"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="ItemType"> <xs:sequence> <xs:element name="Item" type="xs:string"/> <xs:element name="Price" type="xs:decimal"/> </xs:sequence> </xs:complexType> Complex Element
  46. 46. © Raastech, Inc. 2015 | All rights reserved. Slide 46 of 61@Raastech  SOAP stands for “Simple Object Access Protocol”.  It is a communication protocol and allows XML documents to be exchange over HTTP.  As a result, it is platform and technology independent, and ideal for Internet-based communication.  A SOAP message is an XML document that contains the following:  Envelope  Header  Body  Fault Introduction to SOAP
  47. 47. © Raastech, Inc. 2015 | All rights reserved. Slide 47 of 61@Raastech  Example: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"> <soap:Body> <m:Customer xmlns:m="http://raastech.com/Customer"> <m:Name>John Doe</m:Name> </m:Customer> </soap:Body> SOAP Message
  48. 48. © Raastech, Inc. 2015 | All rights reserved. Slide 48 of 61@Raastech  Envelope  Root element of a SOAP message.  xmlns:soap namespace should always have the value of http://www.w3.org/2001/12/soap-envelope.  Header  Optional.  Could include information such as authentication information.  First child element of the Envelope element.  Body  Required.  Contains the content of the SOAP message (i.e., the payload). SOAP Message
  49. 49. © Raastech, Inc. 2015 | All rights reserved. Slide 49 of 61@Raastech  WSDL stands for “Web Services Description Language”.  It is an XML document that describes a web service (i.e., it is the interface specification for the web service).  It specifies the location of the web service, the operations it supports, and the message types. Introduction to WSDL
  50. 50. © Raastech, Inc. 2015 | All rights reserved. Slide 50 of 61@Raastech
  51. 51. © Raastech, Inc. 2015 | All rights reserved. Slide 51 of 61@Raastech Java Web Service Development: Top-Down Approach  A top-down web service begins with a WSDL.  Stubs for the underlying Java classes are created.  Live Development Demo
  52. 52. © Raastech, Inc. 2015 | All rights reserved. Slide 52 of 61@Raastech
  53. 53. © Raastech, Inc. 2015 | All rights reserved. Slide 53 of 61@Raastech Java Web Service Development: Bottom-Up Approach  A bottom-up web service begins with an already existing Java class.  Class and methods are easily exposed as a web service interface.  Live Development Demo
  54. 54. © Raastech, Inc. 2015 | All rights reserved. Slide 54 of 61@Raastech
  55. 55. © Raastech, Inc. 2015 | All rights reserved. Slide 55 of 61@Raastech BPEL Web Service Development  Live Development Demo
  56. 56. © Raastech, Inc. 2015 | All rights reserved. Slide 56 of 61@Raastech
  57. 57. © Raastech, Inc. 2015 | All rights reserved. Slide 57 of 61@Raastech SOAP vs. REST { "Customer": { "FirstName":"John", "LastName":"Doe" } } <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"> <soap:Body> <m:Customer xmlns:m="http://raastech.com/Customer"> <m:FirstName>John</m:FirstName> <m:LastName>Doe</m:LastName> </m:Customer> </soap:Body> SOAP Message  Strong message type validation  Based on XML standard  Wide usage and adoption  Not size-friendly:  Size of data: 7 bytes  Size of message: 236 bytes REST Message  Lightweight and efficient (mobile!)  Growing usage and adoption  Oracle will standardize on REST  Size-friendly:  Size of data: 7 bytes  Size of message: 50 bytes
  58. 58. © Raastech, Inc. 2015 | All rights reserved. Slide 58 of 61@Raastech SOAP vs. REST  http://www.ateam-oracle.com/performance-study-rest-vs-soap-for-mobile-applications/
  59. 59. © Raastech, Inc. 2015 | All rights reserved. Slide 59 of 61@Raastech Recap  Why has web services become the accepted standard?  Are you more familiar with XML terminology?  What is a popular SOAP client testing tool?  What is SOAP and what are the components of a SOAP message?  Can you understand a WSDL when you look at it now?  What is the difference between top-down and bottom-up web service development?  What is REST?
  60. 60. © Raastech, Inc. 2015 | All rights reserved. Slide 60 of 61@Raastech Contact Information  Ahmed Aboulnaga  Technical Director  @Ahmed_Aboulnaga  ahmed.aboulnaga@raastech.com
  61. 61. © Raastech, Inc. 2015 | All rights reserved. Slide 61 of 61@Raastech Q&A

×