T-110.5140 Network Application Frameworks and XML Web Services and WSDL 15.2.2010 Tancred Lindholm



Similar documents
Web Services Technologies

Introduction into Web Services (WS)

WEB SERVICES. Revised 9/29/2015

Web Services Description Language (WSDL) Wanasanan Thongsongkrit

Grid Computing. Web Services. Explanation (2) Explanation. Grid Computing Fall 2006 Paul A. Farrell 9/12/2006

XIII. Service Oriented Computing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

Developing Java Web Services

SW : : Introduction to Web Services with IBM Rational Application Developer V6

What is a Web service?

Creating Web Services in NetBeans

Lesson 4 Web Service Interface Definition (Part I)

A standards-based approach to application integration

Middleware and the Internet. Example: Shopping Service. What could be possible? Service Oriented Architecture

ITS. Java WebService. ITS Data-Solutions Pvt Ltd BENEFITS OF ATTENDANCE:

Author: Gennaro Frazzingaro Universidad Rey Juan Carlos campus de Mostòles (Madrid) GIA Grupo de Inteligencia Artificial

Service-Oriented Architectures

JVA-561. Developing SOAP Web Services in Java

Web services can convert your existing applications into web applications.

Web services (WS) Outline. Intro on Middleware SOAP, HTTP binding WSDL UDDI Development tools References

Introduction to Web Services

Service Oriented Architecture

Middleware and the Internet

CST6445: Web Services Development with Java and XML Lesson 1 Introduction To Web Services Skilltop Technology Limited. All rights reserved.

Introduction to Service Oriented Architectures (SOA)

Digital Signature Web Service Interface

Java Web Services Training

Web Services Technologies: State of the Art

Increasing IT flexibility with IBM WebSphere ESB software.

Increasing IT flexibility with IBM WebSphere ESB software.

How To Create A C++ Web Service

Consuming and Producing Web Services with Web Tools. Christopher M. Judd. President/Consultant Judd Solutions, LLC

EAI OVERVIEW OF ENTERPRISE APPLICATION INTEGRATION CONCEPTS AND ARCHITECTURES. Enterprise Application Integration. Peter R. Egli INDIGOO.

The presentation explains how to create and access the web services using the user interface. WebServices.ppt. Page 1 of 14

Service Oriented Computing: SOAP, WSDL and UDDI. Dr. Cristian Mateos Diaz ( ISISTAN - CONICET

Web Services in Oracle Fusion Middleware. Raghu Kodali Consulting Product Manager & SOA Evangelist Oracle Fusion Middleware Oracle USA

4. Concepts and Technologies for B2C, B2E, and B2B Transaction

Web Services Advanced Topics

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Consuming and Producing Web Services with WST and JST. Christopher M. Judd. President/Consultant Judd Solutions, LLC

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR DEPARTMENT OF COMPUTER APPLICATIONS SUBJECT : MC7502 SERVICE ORIENTED ARCHITECTURE

Web Services and Service Oriented Architectures. Thomas Soddemann, RZG

Developing a Web Service Based Application for Mobile Client

Introduction to WebSphere Process Server and WebSphere Enterprise Service Bus

IBM WebSphere Enterprise Service Bus, Version 6.0.1

WEB SERVICES TEST AUTOMATION

Integration of Hotel Property Management Systems (HPMS) with Global Internet Reservation Systems

Developing XML Solutions with JavaServer Pages Technology

How To Develop A Web Service In A Microsoft J2Ee (Java) 2.5 (Oracle) 2-Year Old (Orcient) 2Dj (Oracles) 2E (Orca) 2Gj (J

SOA Myth or Reality??

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

IBM WebSphere ESB V6.0.1 Technical Product Overview

SOAP and WSDL. At the heart of Web services today are SOAP and WSDL, so it s important that. Part II

Web Services. Distributed Object Systems 11. Web Services, SOAP and NET. Web Applications. Web Services. Web services vs Distributed Objects

Jamcracker Web Services. David Orchard Standards Architect

Modern XML applications

1 What Are Web Services?

Run-time Service Oriented Architecture (SOA) V 0.1

2. Define Contemporary SOA. Contemporary SOA represents an architecture that promotes service orientation through the use of web services.

Service-oriented architecture in e-commerce applications

Web Services Manageability Concepts (WS-Manageability)

Agents and Web Services

XML Processing and Web Services. Chapter 17

Oracle Service Bus. User Guide 10g Release 3 Maintenance Pack 1 (10.3.1) June 2009

Outline SOA. Properties of SOA. Service 2/19/2016. Definitions. Comparison of component technologies. Definitions Component technologies

SOAP Overview. Tamas Szigyarto

REST vs. SOAP: Making the Right Architectural Decision

Web Services Development In a Java Environment

Concept, implementation and performance testing of a mobile Web Service provider for Smart Phones

Introduction to Service-Oriented Architecture for Business Analysts

SCA-based Enterprise Service Bus WebSphere ESB

REST web services. Representational State Transfer Author: Nemanja Kojic

WIRIS quizzes web services Getting started with PHP and Java

Virtual Credit Card Processing System

Siena Web Services. A Solution To Personal Computing With Established Desktop Programs Exploiting Web Technologies

Types of Cloud Computing

Internationalization and Web Services

SOA Planning Guide The Value Enablement Group, LLC. All rights reserved.

BUSINESS PROCESS AND EBXML - WEB SERVICES INTEGRATION PLATFORM, REQUIREMENTS, ARCHITECTURES, SECURITY

Combining SAWSDL, OWL DL and UDDI for Semantically Enhanced Web Service Discovery

How To Understand A Services-Oriented Architecture

IBM SPSS Collaboration and Deployment Services Version 6 Release 0. Single Sign-On Services Developer's Guide

Web Services and their support in Java

SOA CERTIFIED JAVA DEVELOPER (7 Days)

Research on the Model of Enterprise Application Integration with Web Services

1 What Are Web Services?

Principles and Foundations of Web Services: An Holistic View (Technologies, Business Drivers, Models, Architectures and Standards)

Getting Started with Service- Oriented Architecture (SOA) Terminology

An introduction to SOA and the HP NonStop server environment

Web Services. Mark Volkmann Partner Object Computing, Inc. What Are Web Services?

Enterprise Application Designs In Relation to ERP and SOA

Distributed systems. Distributed Systems Architectures

Transcription:

T-110.5140 Network Application Frameworks and XML Web Services and WSDL 15.2.2010 Tancred Lindholm Based on slides by Sasu Tarkoma and Pekka Nikander 1 of 20

Contents Short review of XML & related specs Web Services Driving forces Architecture & protocol stack WSDL 2.0 WSDL 1.x Implementations 2

XML XML (extensible Markup Language) is a framework for defining markup languages Standardized by W3C Idea: to separate syntax from semantics, custom markup, internationalization, platform independence XML Document: prolog, elements, attributes, entity references, comments Validated using DTD or schema Two things: well-formedness and validity 3

XML Document Example XML Declaration + Document Type <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>virtual Library</title> </head> <body> <!-- The following contains a link --> <p>it&apos;s a link to <a href="http://example.org/">example.org</a>.</p> </body> </html> Namespace Comment Element Attribute Entity ref 4

Related standards Namespaces Modular document definition, multiple inheritance, collision avoidance XPath (XQuery) XSLT Navigation and query of parts of the document E.g. /body/*[10] selects 11th child of <body> Extensible Stylesheet Language Transformation Transformation of documents 5

Namespaces Many documents can have identical element names that denote different things E.g. to diffrentiate <number> of credit card and telephone <number>, put these in different name spaces A qualified name is a name subject to namespace interpretation In general, a namespace is just a tag An arbitrary string Defined to be a URI Case-sensitive A common practice to store a schema / WSDL into the place referenced by the URI Semantics depends on the specific platform Some XML validators use these 6

Example namespace <x xmlns:edi='http://ecommerce.example.org/schema'> <!-- the "edi" prefix is bound to http://ecommerce.example.org/schema for the "x" element and contents --> </x> <x xmlns:edi='http://ecommerce.example.org/schema'> <!-- the 'taxclass' attribute's namespace is http://ecommerce.example.org/schema --> <lineitem edi:taxclass="exempt">baby food</lineitem> </x> 7

About Schemas XML language for describing and constraining the content of XML documents A W3C Recommendation Used to specify The allowed structure of an XML document The allowed data types contained in XML documents E.g. a <book> has a <title> and 1 or more <chapter>s XML Schema documents are XML documents 8

<?xml version="1.0" encoding="utf-8"?> <xs:schema elementformdefault="qualified" xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:element name="address"> <xs:complextype> <xs:sequence> <xs:element name="recipient" type="xs:string" /> <xs:element name="house" type="xs:string" /> <xs:element name="street" type="xs:string" /> <xs:element name="town" type="xs:string" /> <xs:element name="county" type="xs:string" minoccurs="0" /> <xs:element name="postcode" type="xs:string" /> <xs:element name="country"> <xs:simpletype> <xs:restriction base="xs:string"> <xs:enumeration value="fr" /> <xs:enumeration value="de" /> <xs:enumeration value="es" /> <xs:enumeration value="uk" /> <xs:enumeration value="us" /> </xs:restriction> </xs:simpletype> </xs:element> </xs:sequence> </xs:complextype> </xs:element> </xs:schema> XML Schema Example <?xml version="1.0" encoding="utf-8"?> <Address> <Recipient>Mr. Walter C. Brown</Recipient> <House>49</House> <Street>Featherstone Street</Street> <Town>LONDON</Town> <PostCode>EC1Y 8SY</PostCode> <Country>UK</Country> </Address> Example source: Wikipedia 9

Web Services Let's make machine-callable services using web principles A central role is played by the description of the service's interface Implementation less important, avoid implementation-specifics Business aspects considered Use across organizations Multiple competing implementations 10

Driving forces I Universal data access / representation Independent of OS, programming language, network protocol, Move from human-centric to applicationcentric web Applications converse with each other and use machine-related information published on the web Application-areas: package tracking, card verification, shopping bots, single sign-on, calendar, email,... 11

Driving forces II Making Web a programming interface We have had servlets, CGI, CORBA for years Idea is to standardise languages and protocols to have better integration Make service composition possible Faster project throughput Better utilization of global resources Cope with heterogeneity Deferred binding Discovery / broker, interpret, compose, execute Many levels of deference 12

A Basic Web Service Computer A Language: C++ OS: W2000 XML XML Computer B Language: Java OS: Linux Independent of language, OS, network protocols 13

Additional properties A web service should be self-describing Interface is published with the implementation Minimum interface is human readable description The interface can also be written in a common XML grammar (WSDL) A web-service should be discoverable The web service is published It has a life cycle Interested parties can find it Not mandatory but desirable properties 14

Standardization W3C Web Services Activity XML Protocol Working Group SOAP Web Services Addressing Working Group How to address WS entities Web Services Choreography Working Group Processes involving several WS, coordination Web Services Description Working Group OASIS WSDL UDDI (Universal Description, Discovery and Integration) WS-I (Web Service Interoperability Org.) Best Practices on how to use WS* standards 15

Web Service Architecture The three major roles in web services Service provider Provider of the WS Service Requestor Any consumer / client Service Registry logically centralized directory of services A protocol stack is needed to support these roles 16

Web Services Protocol Stack Message Exchange Responsible for transporting messages HTTP, BEEP XML Messaging Responsible for encoding messages in common XML format XML-RPC, SOAP Service Description Responsible for describing an interface to a specific web service WSDL Service discovery Responsible for service discovery and search UDDI 17

WS Protocol Stack Discovery: UDDI Discovery: UDDI Description: WSDL Description: WSDL XML Messaging: SOAP, XML-RPC, XML XML Messaging: SOAP, XML-RPC, XML Transport: HTTP, FTP, BEEP, SMTP, JMS Transport: HTTP, FTP, BEEP, SMTP, JMS 18

Main components today XML data representation XML Schema Definitions (xsd) for types XML Namespaces for unambiguity SOAP Basic transport (XML messaging) Sync / async communication and RPC WSDL Description of (SOAP) services UDDI Universal Description Discovery and Integration Service registry 19

Example WS layering Management services:admin, UDDI, depl., auditing Management services:admin, UDDI, depl., auditing Service container Service container J2EE integration J2EE integration Serialization / deserialization (Java to XML mapping) Serialization / deserialization (Java to XML mapping) SOAP processor SOAP processor XML processor XML processor Transport: HTTP(S), SMTP, JMS,.. Transport: HTTP(S), SMTP, JMS,.. 20

XML Messaging Several alternatives for XML messaging SOAP XML Remote Procedure calls (XML-RPC) Regular XML transported over HTTP XML-RPC SOAP HTTP POST/GET 21

SOAP Version 1.2 protocol for exchanging structured (XML) and typed information between peers A SOAP message is formally specified as an XML Infoset ("abstract XML") Infosets can have different on-the-wire representations, one common example of which is as an XML 1.0 document. A stateless, one-way message exchange paradigm Applications can create more complex interaction patterns request/response, request/multiple responses 22

How it could work 1. A standard body creates a WSDL interface definition 2. A service programmer implements a service according to the WSDL definition 3. A client programmer implements a client according to the WSDL definition 4. A service provider deploys the service and publishes a WSDL implementation definition, and registers it into UDDI 5. A client program pulls WSDL from UDDI, checks conformance, and uses SOAP for access 23

2. Creating server application Pull WSDL definition from somewhere (UDDI) Only use high-level WSDL, no bindings yet Generate platform specific skeleton code using automated tools Write the actual program code 24

3. Creating client application Pull WSDL definition from somewhere (UDDI) Use only high-level WSDL, no bindings yet Generate platform specific stub code using automated tools Write the actual program code 25

4. Deploying the service UDDI WSDL document WSDL interface WS service WS service SOAP proc. SOAP proc. WSDL binding Transport 26

5. Using a service WSDL interface WSDL document UDDI WS service WS service SOAP proc. SOAP proc. Transport WSDL binding 27

About invocation mechanisms WS does not define invocation/execution mechanism Alternatives Microsoft.NET framework Java-based framework JAVA API for WSDL (JWSDL) JAX-RPC Java API for XML registries (JAXR) Apache Axis... 28

What is WSDL? WSDL: Web Service Description Language An XML language used to describe and locate web services location of web service methods that are available data type information Commonly used to describe SOAP-based services W3C standard (work in progress) Initial input: WSDL 1.1 as W3C Note Current version 2.0 (Recommendation) Some differences between 1.1 and 2.0 29

WSDL Document Elements (v. 2.0) <types> - data type definitions <interface> - A set of abstract operations <binding> - Concrete protocol and data format specifications for the operations and messages defined by a particular interface. Endpoint type. <endpoint> - An address for binding. Endpoint instance. <service> - A set of endpoints 30

WSDL Overview <definitions>: ROOT WSDL element <types>: The data types that are used <types>: The data types that are used <interface>: The supported operations <interface>: The supported operations <binding>: The binding to concrete protocols <binding>: The binding to concrete protocols <service>: Reference to actual location <service>: Reference to actual location 31

A WSDL Document A WSDL document contains two parts Abstract part Interfaces, types Concrete part Binding to concrete protocol and encoding May be published separately Interfaces agreed between many companies Each company published their own implementation in UDDI and import the abstract interface. 32

The main structure (v. 2.0) <definitions namespace = "http://.."> <types>xml Schema types</types> <interface>a set of operations</interface> <binding>communication protocols</binding> <service>a list of binding and endpoints</service> </definitions> 33

Types <types> define data types used in interface declaration For platform neutrality, WSDL uses XML Schema syntax to define data XML Schema must be supported by any vendor of WSDL conformant products Other kinds of type definitions also possible Possible interoperability issues If the service uses only XML Schema built-in simple types, such as strings and integers, the types element is not required 34

WSDL Interfaces The <interface> element is the most important WSDL element The operations that can be performed An <endpoint> defines the connection point to a web service, an instance of <interface> It can be compared to a function library (or a module, or a class) in a programming language 35

Message Exchange Patterns In-Only: The operation can receive a message but will not return a response In-Out: The operation can receive a request and will return a response Out-In: The endpoint sends an output message and then receives an input message. Out-Only: The endpoint can send a message but will not wait for a response Robust- variants: faults can occur 36

Example <types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema"...> <xsd:element name="tradepricerequest" type="xsd:string"/> <xsd:element name="tradeprice" type="xsd:float"/> </types> <interface name="stockquote"> <operation name="getlasttradeprice" pattern="http://www.w3.org/ns/wsdl/in-out "> <input message="in" element="tradepricerequest" /> <output message="out" element="tradeprice "/> </operation> </interface> 37

Putting it together Type Type Interface Endpoint Original source: http://msdn.microsoft.com/ 38

WSDL 2.0 3 specifications Part 1: Core Abstract interfaces, independent of protocol and encoding Part 2: Message Exchange Patterns Predefined types of interactions Part 3: Bindings SOAP and HTTP/MIME binding Lots of changes from 1.1 39

Changes from 1.1 to 2.0 Adding further semantics to the description language. Removal of message constructs. No support for operator overloading. PortTypes renamed to interfaces. Support for interface inheritance is achieved by using the extends attribute in the interface element. Ports renamed to endpoints. Abstracted message patterns 40

Implementations Microsoft.NET SOAP 1.1, WSDL 1.1 Java API for XML-based RPC (JAX-RPC) SOAP 1.1, WSDL 1.1 Java API for XML Registries (JAXR) Apache Axis Tools for automatically creating WSDL to/from Java SOAP 1.1 and 1.2, WSDL 1.1, JAX-RPC 1.0 Axis2 supports WSDL 2.0 component model IBM Websphere, BEA Web Logic, SAP NetWeaver, 41

Uses of WSDL documents Description of service interfaces Compile-time Developer uses WSDL before service deployment Run-time Client downloads WSDL description and uses the info it provides to execute the service As a side-effect Developers can use WSDL to speed up the development of code WSDL Java code Java interfaces WSDL 42

WS Criticism Quite heavy, lots of specs More suited for large well-structured organizations, rather than fast innovation? Is there anything new here? Are all abstraction layers really needed? REST 43

Summary Web Services: let's make machinecallable services using web principles XML as universal syntax Web Services Stack Is all this really necessary? 44

Extra: WSDL 1.1 Messages The <message> element defines the data elements of an operation the name of the message contains zero or more message part elements The parts can be compared to the parameters of a function call in a traditional programming language All parts are typed by an XML Schema type V.2.0 changes: message element is not used, replaced by patterns 45