SlideShare a Scribd company logo
1 of 28
Java Training Overview
Web Services
Introduction
• Who am I?
– Worked for TSB for 13+ years as FNA
– October 2012 moved to ITSO
– TSB and ITSO was kind enough to send me to San
Antonio with Sean, Vicky and Tony
What we will be covering
•
•
•
•

Web services architecture
Web services definitions and terms
How Web Services work
Overview and examples of SOAP and RESTful
Web Services
What we won’t be covering
• Java programming
• How to functional test Web Services
What are Web Services?

“A piece of software that provides some useful
functionality by a programmatic interface that is
available via the standard protocols of the Internet.”
What are Web Services?
•
•
•
•

Application components
Use open protocols
Self-contained and self-describing
Can be discovered using Universal Description
Discovery and Integration (UDDI)
• Can be used by other applications
• Allows data exchange between different applications
and different platforms
Web Services Platform
•
•
•
•
•
•

Lots of confusion
2 general types of Web Services – SOAP and REST
SOAP is a protocol, REST is an architecture style
Can have many overlaps
Usually over HTTP
Usually uses XML (or JSON)
How do Web Services work?
CGI
Web
Application

Browser
HTML

Web
Service

Client
(Phone
App)

Web
Service
Web
Service

Web Service
Provider

Database
SOAP
SOAP…
•
•
•
•
•
•
•
•
•

Stands for Simple Object Access Protocol
Is a communication protocol
Is a format for sending messages
Is designed to communicate via the Internet
Is platform and language independent
Is based on XML
Is simple and extensible
Allows you to get around firewalls
Is a W3C standard
SOAP building blocks
A SOAP message is an ordinary XML document
containing the following elements:
• An Envelope element that identifies the XML
document as a SOAP message
• A Header element that contains header information
• A Body element that contains call and response
information
• A Fault element containing errors and status
information
SOAP syntax rules
• A SOAP message MUST be encoded using XML
• A SOAP message MUST use the SOAP Envelope
namespace
• A SOAP message MUST use the SOAP Encoding
namespace
• A SOAP message must NOT contain a DTD reference
• A SOAP message must NOT contain XML Processing
Instructions
• SOAP request could be an HTTP POST or HTTP GET
Example: A SOAP Request
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
Example: A SOAP Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPriceResponse>
<m:Price>34.5</m:Price>
</m:GetStockPriceResponse>
</soap:Body>
</soap:Envelope>
WSDL
WSDL is an XML-based language for locating and
describing Web services.
• WSDL stands for Web Services Description Language
• WSDL is based on XML
• WSDL is used to describe Web services
• WSDL is used to locate Web services
• WSDL is a W3C standard
WSDL document structure
The main structure of a WSDL document looks like this:
<definitions>

<types>
data type definitions........
</types>
<message>
definition of the data being communicated....
</message>

<portType>
set of operations......
</portType>
<binding>
protocol and data format specification....
</binding>

</definitions>
A WSDL document can also contain other elements, like extension elements, and a service element that makes it
possible to group together the definitions of several web services in one single WSDL document.
Example: WSDL document
<message name="getTermRequest">
<part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
<operation name="getTerm">
<input message="getTermRequest"/>
<output message="getTermResponse"/>
</operation>
</portType>
UDDI
UDDI is a directory service where companies can
register and search for Web services.
• UDDI stands for Universal Description, Discovery
and Integration
• UDDI is a directory for storing information about
web services
• UDDI is a directory of web service interfaces
described by WSDL
• UDDI communicates via SOAP
• UDDI is built into the Microsoft .NET platform
REST
REST
•
•
•
•
•
•
•
•

XML
HTTP
URIs
Soap has a single front door, REST has URIs
Resource based, each with it's own URI
Requests are GETs and responses are XML
No request body, no SOAP envelope
SOAP only does GET and POST, REST does GET, POST,
PUT, DELETE (and others)
Key component of a REST architecture
• Resources, which are identified by logical URLs.
Both state and functionality are represented using resources.
– The logical URLs imply that the resources are universally
addressable by other parts of the system.
– Resources are the key element of a true RESTful design,
as opposed to "methods" or "services" used in RPC and
SOAP Web Services, respectively. You do not issue a
"getProductName" and then a "getProductPrice" RPC calls
in REST; rather, you view the product data as a resource -and this resource should contain all the required
information (or links to it).
Key component of a REST architecture
• A web of resources, meaning that a single resource should
not be overwhelmingly large and contain too fine-grained
details. Whenever relevant, a resource should contain links to
additional information -- just as in web pages.
• The system has a client-server, but of course one
component's server can be another component's client.
• There is no connection state; interaction is stateless (although
the servers and resources can of course be stateful). Each new
request should carry all the information required to complete
it, and must not rely on previous interactions with the same
client.
Key component of a REST architecture
• Resources should be cachable whenever possible (with an
expiration date/time). The protocol must allow the server to
explicitly specify which resources may be cached, and for how
long.
– Since HTTP is universally used as the REST protocol, the
HTTP cache-control headers are used for this purpose.
– Clients must respect the server's cache specification for
each resource.
• Proxy servers can be used as part of the architecture, to
improve performance and scalability. Any standard HTTP
proxy can be used.
REST: Request Example
• REST Request is often just a URL
http://www.acme.com/phonebook/UserDetails?firstName=John&lastName=Doe

or
http://www.acme.com/phonebook/UserDetails/firstName/John/lastName/Doe

• While REST services might use XML in
their responses (as one way of organizing structured
data), REST requests rarely use XML.
REST: Response Example
• Response is usually XML or JSON
<person>
<firstName>John</firstName>
<lastName>Doe</lastName>
<age>25</age>
<address>
<streetAddress>21 2nd Street</streetAddress>
<city>New York</city>
<state>NY</state>
<postalCode>10021</postalCode>
</address>
<phoneNumbers>
<phoneNumber type="home">212 555-1234</phoneNumber>
<phoneNumber type="fax">646 555-4567</phoneNumber>
</phoneNumbers>
</person>
That, in a nutshell, is it
What we covered
•
•
•
•

Web services architecture
Web services definitions and terms
How Web Services work
Overview and examples of SOAP and RESTful
Web Services
Questions?

More Related Content

What's hot

Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigMandakini Kumari
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIPankaj Bajaj
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolMasud Rahman
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsIdo Flatow
 
Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesIMC Institute
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Mehul Boricha
 
Introduction to RESTful Webservice
Introduction to RESTful WebserviceIntroduction to RESTful Webservice
Introduction to RESTful WebserviceEftakhairul Islam
 
Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Peter R. Egli
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)Jef Claes
 
Java Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIJava Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIIMC Institute
 
WebService-Java
WebService-JavaWebService-Java
WebService-Javahalwal
 
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesDeveloping and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesStephenKardian
 

What's hot (20)

Web Service
Web ServiceWeb Service
Web Service
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
 
Web service
Web serviceWeb service
Web service
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
Webservice Testing
Webservice TestingWebservice Testing
Webservice Testing
 
Excellent rest using asp.net web api
Excellent rest using asp.net web apiExcellent rest using asp.net web api
Excellent rest using asp.net web api
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
 
Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web Services
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
 
Introduction to RESTful Webservice
Introduction to RESTful WebserviceIntroduction to RESTful Webservice
Introduction to RESTful Webservice
 
Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)
 
Java Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIJava Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDI
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesDeveloping and Hosting SOAP Based Services
Developing and Hosting SOAP Based Services
 

Viewers also liked

Media evaluation question 5
Media evaluation question 5Media evaluation question 5
Media evaluation question 5brandoncuriel4
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGMarakana Inc.
 
Java ppt Gandhi Ravi (gandhiri@gmail.com)
Java ppt  Gandhi Ravi  (gandhiri@gmail.com)Java ppt  Gandhi Ravi  (gandhiri@gmail.com)
Java ppt Gandhi Ravi (gandhiri@gmail.com)Gandhi Ravi
 
Soap vs. rest - which is right web service protocol for your need?
Soap vs. rest -  which is right web service protocol for your need?Soap vs. rest -  which is right web service protocol for your need?
Soap vs. rest - which is right web service protocol for your need?Vijay Prasad Gupta
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with JavaJussi Pohjolainen
 

Viewers also liked (13)

Java for the Beginners
Java for the BeginnersJava for the Beginners
Java for the Beginners
 
Java presentation
Java presentation Java presentation
Java presentation
 
Media evaluation question 5
Media evaluation question 5Media evaluation question 5
Media evaluation question 5
 
Java seminar
Java seminarJava seminar
Java seminar
 
Intro to java
Intro to javaIntro to java
Intro to java
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Java ppt Gandhi Ravi (gandhiri@gmail.com)
Java ppt  Gandhi Ravi  (gandhiri@gmail.com)Java ppt  Gandhi Ravi  (gandhiri@gmail.com)
Java ppt Gandhi Ravi (gandhiri@gmail.com)
 
Soap vs. rest - which is right web service protocol for your need?
Soap vs. rest -  which is right web service protocol for your need?Soap vs. rest -  which is right web service protocol for your need?
Soap vs. rest - which is right web service protocol for your need?
 
Part3
Part3Part3
Part3
 
Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Similar to Overview of java web services

Similar to Overview of java web services (20)

Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service Design
 
Rest APIs Training
Rest APIs TrainingRest APIs Training
Rest APIs Training
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
complete web service1.ppt
complete web service1.pptcomplete web service1.ppt
complete web service1.ppt
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with java
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Why do you need REST
Why do you need RESTWhy do you need REST
Why do you need REST
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
 
SOA and web services
SOA and web servicesSOA and web services
SOA and web services
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Rest WebAPI with OData
Rest WebAPI with ODataRest WebAPI with OData
Rest WebAPI with OData
 
Ntg web services
Ntg   web servicesNtg   web services
Ntg web services
 
Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAP
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Developmeant and deployment of webservice
Developmeant and deployment of webserviceDevelopmeant and deployment of webservice
Developmeant and deployment of webservice
 

More from Todd Benson (I.T. SPECIALIST and I.T. SECURITY) (9)

Owasp consumer top 10 safe habits
Owasp consumer top 10 safe habitsOwasp consumer top 10 safe habits
Owasp consumer top 10 safe habits
 
The Unlikely Couple, DevOps and Security. Can it work?
The Unlikely Couple, DevOps and Security. Can it work?The Unlikely Couple, DevOps and Security. Can it work?
The Unlikely Couple, DevOps and Security. Can it work?
 
Sar writingv2
Sar writingv2Sar writingv2
Sar writingv2
 
Defending web applications v.1.0
Defending web applications v.1.0Defending web applications v.1.0
Defending web applications v.1.0
 
Application Context and Discovering XSS without
Application Context and Discovering XSS without Application Context and Discovering XSS without
Application Context and Discovering XSS without
 
SQLmap
SQLmapSQLmap
SQLmap
 
Regex 101
Regex 101Regex 101
Regex 101
 
Becoming a better pen tester overview
Becoming a better pen tester overviewBecoming a better pen tester overview
Becoming a better pen tester overview
 
SSL overview
SSL overviewSSL overview
SSL overview
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Overview of java web services

  • 2. Introduction • Who am I? – Worked for TSB for 13+ years as FNA – October 2012 moved to ITSO – TSB and ITSO was kind enough to send me to San Antonio with Sean, Vicky and Tony
  • 3. What we will be covering • • • • Web services architecture Web services definitions and terms How Web Services work Overview and examples of SOAP and RESTful Web Services
  • 4. What we won’t be covering • Java programming • How to functional test Web Services
  • 5. What are Web Services? “A piece of software that provides some useful functionality by a programmatic interface that is available via the standard protocols of the Internet.”
  • 6. What are Web Services? • • • • Application components Use open protocols Self-contained and self-describing Can be discovered using Universal Description Discovery and Integration (UDDI) • Can be used by other applications • Allows data exchange between different applications and different platforms
  • 7. Web Services Platform • • • • • • Lots of confusion 2 general types of Web Services – SOAP and REST SOAP is a protocol, REST is an architecture style Can have many overlaps Usually over HTTP Usually uses XML (or JSON)
  • 8. How do Web Services work? CGI Web Application Browser HTML Web Service Client (Phone App) Web Service Web Service Web Service Provider Database
  • 10. SOAP… • • • • • • • • • Stands for Simple Object Access Protocol Is a communication protocol Is a format for sending messages Is designed to communicate via the Internet Is platform and language independent Is based on XML Is simple and extensible Allows you to get around firewalls Is a W3C standard
  • 11. SOAP building blocks A SOAP message is an ordinary XML document containing the following elements: • An Envelope element that identifies the XML document as a SOAP message • A Header element that contains header information • A Body element that contains call and response information • A Fault element containing errors and status information
  • 12. SOAP syntax rules • A SOAP message MUST be encoded using XML • A SOAP message MUST use the SOAP Envelope namespace • A SOAP message MUST use the SOAP Encoding namespace • A SOAP message must NOT contain a DTD reference • A SOAP message must NOT contain XML Processing Instructions • SOAP request could be an HTTP POST or HTTP GET
  • 13. Example: A SOAP Request POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
  • 14. Example: A SOAP Response HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
  • 15. WSDL WSDL is an XML-based language for locating and describing Web services. • WSDL stands for Web Services Description Language • WSDL is based on XML • WSDL is used to describe Web services • WSDL is used to locate Web services • WSDL is a W3C standard
  • 16. WSDL document structure The main structure of a WSDL document looks like this: <definitions> <types> data type definitions........ </types> <message> definition of the data being communicated.... </message> <portType> set of operations...... </portType> <binding> protocol and data format specification.... </binding> </definitions> A WSDL document can also contain other elements, like extension elements, and a service element that makes it possible to group together the definitions of several web services in one single WSDL document.
  • 17. Example: WSDL document <message name="getTermRequest"> <part name="term" type="xs:string"/> </message> <message name="getTermResponse"> <part name="value" type="xs:string"/> </message> <portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation> </portType>
  • 18. UDDI UDDI is a directory service where companies can register and search for Web services. • UDDI stands for Universal Description, Discovery and Integration • UDDI is a directory for storing information about web services • UDDI is a directory of web service interfaces described by WSDL • UDDI communicates via SOAP • UDDI is built into the Microsoft .NET platform
  • 19. REST
  • 20. REST • • • • • • • • XML HTTP URIs Soap has a single front door, REST has URIs Resource based, each with it's own URI Requests are GETs and responses are XML No request body, no SOAP envelope SOAP only does GET and POST, REST does GET, POST, PUT, DELETE (and others)
  • 21. Key component of a REST architecture • Resources, which are identified by logical URLs. Both state and functionality are represented using resources. – The logical URLs imply that the resources are universally addressable by other parts of the system. – Resources are the key element of a true RESTful design, as opposed to "methods" or "services" used in RPC and SOAP Web Services, respectively. You do not issue a "getProductName" and then a "getProductPrice" RPC calls in REST; rather, you view the product data as a resource -and this resource should contain all the required information (or links to it).
  • 22. Key component of a REST architecture • A web of resources, meaning that a single resource should not be overwhelmingly large and contain too fine-grained details. Whenever relevant, a resource should contain links to additional information -- just as in web pages. • The system has a client-server, but of course one component's server can be another component's client. • There is no connection state; interaction is stateless (although the servers and resources can of course be stateful). Each new request should carry all the information required to complete it, and must not rely on previous interactions with the same client.
  • 23. Key component of a REST architecture • Resources should be cachable whenever possible (with an expiration date/time). The protocol must allow the server to explicitly specify which resources may be cached, and for how long. – Since HTTP is universally used as the REST protocol, the HTTP cache-control headers are used for this purpose. – Clients must respect the server's cache specification for each resource. • Proxy servers can be used as part of the architecture, to improve performance and scalability. Any standard HTTP proxy can be used.
  • 24. REST: Request Example • REST Request is often just a URL http://www.acme.com/phonebook/UserDetails?firstName=John&lastName=Doe or http://www.acme.com/phonebook/UserDetails/firstName/John/lastName/Doe • While REST services might use XML in their responses (as one way of organizing structured data), REST requests rarely use XML.
  • 25. REST: Response Example • Response is usually XML or JSON <person> <firstName>John</firstName> <lastName>Doe</lastName> <age>25</age> <address> <streetAddress>21 2nd Street</streetAddress> <city>New York</city> <state>NY</state> <postalCode>10021</postalCode> </address> <phoneNumbers> <phoneNumber type="home">212 555-1234</phoneNumber> <phoneNumber type="fax">646 555-4567</phoneNumber> </phoneNumbers> </person>
  • 26. That, in a nutshell, is it
  • 27. What we covered • • • • Web services architecture Web services definitions and terms How Web Services work Overview and examples of SOAP and RESTful Web Services

Editor's Notes

  1. A WSDL document describes a web service using these major elements:ElementDescription&lt;types&gt;A container for data type definitions used by the web service&lt;message&gt;A typed definition of the data being communicated&lt;portType&gt;A set of operations supported by one or more endpoints&lt;binding&gt;A protocol and data format specification for a particular port type
  2. In this example the &lt;portType&gt; element defines &quot;glossaryTerms&quot; as the name of a port, and &quot;getTerm&quot; as the name of an operation.The &quot;getTerm&quot; operation has an input message called &quot;getTermRequest&quot; and an output messagecalled &quot;getTermResponse&quot;.The &lt;message&gt; elements define the parts of each message and the associated data types.Compared to traditional programming, glossaryTerms is a function library, &quot;getTerm&quot; is a function with &quot;getTermRequest&quot; as the input parameter, and getTermResponse as the return parameter.