Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in...

26
Presentation 7 part 2: SOAP & WSDL
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    212
  • download

    0

Transcript of Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in...

Page 1: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Presentation 7 part 2:

SOAP & WSDL

Page 2: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 2

Outline

• Building blocks in Web Services SOA• SOAP• WSDL• (UDDI)

Page 3: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 3

Service-Oriented Architecture (SOA)

ClientClientServerServer

RegistryRegistryAbstract Architecture- Web service stackAbstract Architecture- Web service stack

Legacycode onserver

Legacycode onserver

11 22

33

Opening up for doing business (the sharing of objects) on the Internet

Page 4: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 4

Technologies for Implementing SOA

SOAP for communicationSOAP for communication WSDL for contract & bindingWSDL for contract & binding

UDDI & WSDL for registration & discoveryUDDI & WSDL for registration & discovery

Page 5: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 5

What is SOAP?

• Simple Object Access Protocol• Akronym no longer spelled out from 1.2• Wire protocol similar to

– IIOP for CORBA– JRMP for RMI

• XML is used for data encoding – “text” based protocol vs. “binary” protocol

• Supports XML-based RPC

Page 6: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 6

What is Not SOAP?

• Not a component model– So it will not replace objects and components, i.e. EJB,

JavaBeans and .NET

• Not a programming language– So it will not replace Java, C# og C++

• Not a solution for all– So it will not replace other distributed computing

technologies such as RMI and CORBA

Page 7: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 7

Where is SOAP?

• W3C XML Protocol working group– SOAP 1.2 current version:

http://www.w3.org/TR/soap12/– Many only support SOAP 1.1

• Microsoft, SUN, Oracle, HP, IBM all support the W3C recommendation– but there are still differences to be overcome– security issues, transactions etc.

Page 8: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 8

What does SOAP define?

• Message Envelope• Encoding Rules• RPC Convention• Binding with underlying protocols

– HTTP (which we will use in this course)– SMTP– FTP and others

Page 9: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 9

SOAP Message Format

Possible to Attach binaries (images, cryptographic material) to attachmentsPossible to Attach binaries (images, cryptographic material) to attachments

Page 10: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 10

SOAP Message Envelope

• Encoding information• Header

– Optional– Could contain context knowledge

• Security• Transaction

• Body– RPC methods and parameters– Contains application data

Page 11: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 11

Two types of communication

Page 12: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 12

Request to HelloWorld.jws

Input parameters type stringInput parameters type string

HTTP Post CallHTTP Post Call

HTTP Host TargetHTTP Host Target

Method nameMethod name

Page 13: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 13

… and the HTTP Response from Server

HTTP ResponseHTTP Response

Method ResponseMethod Response

Parameter valueParameter valueParameter nameParameter name

Apache Tomcat Server RespondingApache Tomcat Server Responding

Page 14: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 14

Issues with SOAP

• Issues with SOAP– Lack of business semantics– Insufficient functionality for business operations– Security– Reliability– Under development

• Low performance

Page 15: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 15

WSDL

• WSDL is used for describing WebServices

Page 16: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 16

What is WSDL?

• XML language for describing web services• Web service is described as

– A set of communication endpoints (ports)

• Endpoint is made of– Abstract definitions of operations and messages– Concrete binding to networking protocol and message

format

Page 17: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 17

Why WSDL?

• Enables automation of communication details between communicating partners– Machines can read WSDL– Machines can invoke a service defined in WSDL

• Note that WSDL defines only low-level aspects of Web services, however other technologies might follow …– Security– Transactions– Persistency

Page 18: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 18

WSDL Document Example

• Simple service providing stock quotes• A single operation called GetLastTradePrice• Deployed using SOAP 1.1 over HTTP• Request takes a ticker symbol of type string• Response returns price as a float

Page 19: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 19

WSDL Elements

• Types– Data type definitions– Used to describe exchanged messages– Uses W3C XML Schema as canonical type system

Page 20: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 20

WSDL Elements

• Messages– Abstract, typed definitions of data being exchanged

• Operations– Abstract description of an action– Refers to input and output messages

• Port type– Collection of operations – Resembles a Class in OOPL

Page 21: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 21

WSDL Elements

• Binding– Concrete protocol and data format for a particular Port

type– Example: SOAP 1.1, HTTP, MIME

• Port– Defines a single communication endpoint– Address for binding– URL for HTTP, email address for SMTP

• Service– Aggregate set of related ports

Page 22: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 22

HelloWorld.jws?wsdl

Page 23: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 23

UDDI

• UDDI for publishing & discovery – the SOA

Page 24: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 24

UDDI

• Universal Description, Discovery & Integration• UDDI defines a scheme to publish and discover

information about Web services• Programmatic registration and discovery business

entities and their Web services• Based on SOAP, HTTP, XML• Registry data

– Business registrations– Service type definitions

Page 25: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 25

Registration

• “ White pages”– Address, contact, and known identifiers

• “ Yellow pages”– industrial categorizations– Industry: NAICS (Industry codes - US Govt.)– Product/Services: UN/SPSC (ECMA)– Location: Geographical taxonomy

• “ Green pages”– technical information about services

Page 26: Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)

Ingeniørhøjskolen i ÅrhusSlide 26

What uses UDDI?

• Tool building client (Service Consumer)– Browse or search registry– Create a service proxy

• Tool publishing the service– Generates WSDL– Construct UDDI entries

• Application that needs dynamic binding– Directly access UDDI– Query can be pre-generated