webservices - university of edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/web...ability...

28
WebServices Brian Hulse WebServices Development IBM Hursley brian_hulse @ uk.ibm.com

Upload: others

Post on 09-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WebServices

Brian HulseWebServices DevelopmentIBM Hursleybrian_hulse @ uk.ibm.com

Page 2: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

What ARE WebServices?

Modular applications defined, invoked and found using open standards and XMLHow to define a WebService (WSDL)How to invoke a WebService (SOAP)How to find a WebService (UDDI)

Page 3: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Why? (Business requirements )

Mergers, de-mergers, partnerships, marketplaces, supply chainsCombine and re-use resources, systems, and data

From different technologies, departments, companiesTo build new products & services

Fast, flexible, non-disruptiveLow cost to get startedAvailable skills

Page 4: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

How? (Standards)Architectural blueprintOpen standards“Lingua Franca” for communications and integrationTools to get at existing systemsComposition, flow, process managementDecoupled

Standardised or described interfaces

Ability to specify required quality of servicePerformance, SLA, security, responsiveness

Page 5: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Storebrand example390,000 employees in 6,500 companies have a Storebrand pensionUpdates by mail, fax or file transferNow payroll systems connect directly to Storebrand overWebServicesjStart project developed first WebService in days

Java WebApp Server

WindowsPayroll system

SOAPconnector

SOAPservice

SOAP updateHTTPS message

Mainframe pension system

Page 6: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Service Oriented ArchitectureService

Directory (UDDI node)

Service Requestor

Service Provider

FINDWSDL <- UDDI

PUBLISHWSDL -> UDDI

BINDSOAP (via WSDL)

Page 7: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

SOAPSimple Object Access ProtocolAn XML messaging formatLanguage independentExtensible

BindingsData

SOAP being developed as a W3C standard

Page 8: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

A SOAP Message<SOAP-ENV:Envelope>

xmlns:SOAP-ENV="http://{soaporg}/envelope/"SOAP-ENV:encodingStyle=

"http://{soaporg}/encoding/">

<SOAP-ENV:Body><m:GetLastTradePrice xmlns:m="Some-URI">

<symbol>IBM</symbol></m:GetLastTradePrice>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 9: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

SOAP Messaging Model

Fundamentally one-way messagessequences can be combined for request/response etc.

Defines a message path for routing messages

Receiver looks at message and processes it and replies or whatever

Page 10: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

SOAP runtime

Apache SOAP toolkitDownload from http://xml.apache.orgServletUses a SOAPMappingRegistry to parse incoming messagesPluggableProviders can call JavaBeans, Scripts, EJBs, and .NET objects

Apache Axis is the next revision

Page 11: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WSDL details

Three aspects:PortTypes (interface)

Abstract descriptions of services Bindings

The linkage to a “real” implementation – e.g. SOAPPort (endpoint)

The address of the actual service endpoint

Page 12: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WSDL graphicallyService

Port(e.g. http://host/svc)

Binding(e.g. SOAP)

Abstract definition of the service

PortType

Operation(s)inMessage outMessage

Parts Parts Parts Parts

Port

Binding

Page 13: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

PortTypes

A PortType exposes a set of OperationsAn operation sees a MessageA message is a set of named PartsA Part is either:

An abstract typed object – described in XSDAn XML Element – described in XSD

Page 14: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Bindings

Bindings specify how to expose a PortType as a real service

Allow extensibility elements that describe:How the binding maps to the protocol

Bindings are exposed at runtime through a PortA set of ports is a Service

Page 15: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

What is UDDI?

An architecture for WebServicesStandards-based specifications for service description and discoveryShared operation across multiple implementations

Partnership among industry leaders, starting with Ariba, HP, IBM, and Microsoft

Page 16: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

How UDDI v1 Works

UDDI Service Registry

Businesses populate the registry withdescriptions of the services they support

1.

ServicesSpecifications

BusinessRegistrations

2. UDDI assigns a programmatically unique identifier to each service description and business registration and stores them an Internet registry

Marketplaces, search engines, and business apps query the registry to discover services at other companies

3.

Page 17: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

UDDI: What’s in the registry?

PagesAddress, contact, and identifiers

PagesIndustrial categorizations based on standard taxonomies

PagesTechnical information about services that are exposed by the business

Page 18: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

UDDIUniversal Discovery Description and Integration

Page 19: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Building a WebServicebottom up

Java Business

Object(JavaBean or EJB)

Deployment for Server

WSDL document

<portType><SOAP binding>

<port><service>

Client Stub

WebSphereSOAP Router

UDDI

ToolingRuntime

Page 20: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Building a WebServicetop down

Java Skeleton

(then coded to connect to newor existing logic)

Deployment for Server

WSDL document

<portType><SOAP binding>

<port><service>

Client Stub

WebSphereSOAP Router

UDDI optional

ToolingRuntime

Page 21: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WebServices today

SOAP, WSDL and UDDIA core platformStable – with 2nd/3rd generation code

The future? “Is it secure?”“What about performance?”“How do I deal with unreliability?”

Page 22: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WS-Security

Moves authentication, encryption and signature from transport (e.g. HTTPS)to SOAP level

UserID/Password, Kerberos tokens, CertificatesBody and element level encryptionDigital Signatures

Allows multi-hop scenariosInteroperability Tests have been performed in publicNow part of IBM WebSphere product set

Page 23: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Transactions and Co-ordination

Two phase commit is restricted to specialised tightly-coupled environmentsCompensation is a better model for loosely coupled environments

No locks heldLong running transactions possibleDifference between

rollback to previous statecompensate by an equal and opposite transaction

WS-Transaction/WS-Coordination specifications

Page 24: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Reliability

A number of proposalsebXML has a reliable messaging frameworkWS-Reliability been proposed by a group of companiesBEA has also published some proposals

New OASIS Web Services Reliable Messaging (WSRM) technical committee formed

http://www.oasis-open.org/committees/wsrm/

Page 25: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WS-Policy FrameworkA joint proposal from:

IBM, Microsoft, BEA and SAPAllowing the description and publication of:

CapabilitiesRequirements

Allows Quality of Service to be described and publishedDomain specific specifications build on this:

WS-SecurityPolicyWS-TransactionPolicy

Page 26: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

WS-Policy in one slide Assertion

An individual capability, requirementDefined by extension specifications, e.g. Confidentialityassertion in WS-SecurityPolicy

Assertions are grouped into Statementse.g. <wsp:OneOrMore>

<assertion1><assertion2>

</wsp:OneOrMore>

Policy Attachment defines how to link from A WSDL document or UDDI entry to a policySpecified in WS-PolicyAttachment specification

Page 27: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

Web Services Architecture and Standards

Business Business ProcessesProcessesBPEL4WSBPEL4WS

Quality Quality of Serviceof Service

SecuritySecurity TransactionsTransactionsCoCo--ordinationordination

DescriptionDescriptionPolicyPolicyPolicy

WSDL, UDDIWSDL, UDDI

Other protocolsOther services MessagingMessaging

SOAP (Logical Messaging)SOAP (Logical Messaging)

XML, EncodingXML, Encoding

TransportTransportHTTP,HTTPR,JMS,SMTP,IIOPHTTP,HTTPR,JMS,SMTP,IIOP

Page 28: WebServices - University of Edinburghhomepages.inf.ed.ac.uk/stg/teaching/ec/handouts/Web...Ability to specify required quality of service Performance, SLA, security, responsiveness

A few resources

Apache WebServices project (inc. Axis)http://ws.apache.org

Web Services Toolkitwww.alphaworks.ibm.com/tech/webservicestoolkit

developerWorks WebServices Zonewww.ibm.com/developerworks