320 likes | 386 Views
BCS Teesside Web Services. David Fuller. What I will cover. What are Web Services? What is SOA? What is BPEL? Demonstrate the construction of a web service. What are Web Services.
E N D
BCS TeessideWeb Services David Fuller
What I will cover • What are Web Services? • What is SOA? • What is BPEL? • Demonstrate the construction of a web service
What are Web Services A 'Web service' is defined by the W3C as "a software system designed to support interoperablemachine-to-machine interaction over a network" In common usage the term refers to clients and servers that communicate over the HTTP protocol used on the Web. Such services tend to fall into one of two camps: Big Web Services and RESTful Web Services. Source Wikipedia
What are RESTful Web Services? • Representational state transfer • Described by Roy Thomas Fielding • A key design idiom that embraces a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URLs • It’s what the world-wide-web does
What are Big Web Services’ • "Big Web Services" use XML messages that generally follow the SOAP standard • there is often machine-readable description of the operations offered by the service written in the Web Services Description Language (WSDL)
Acronym Competition WSDL Web Service Description Language
Acronym Competition UDDI Universal Description, Discovery and Integration
Acronym Competition SOAP It doesn’t stand for anything It used to be ‘Simple Object Access Protocol’ but no more
Acronym Competition JAX-RPC Java Api for Xml-based Remote Procedure Call – Now part of JAX-WS
Acronym Competition JSR Java Specification Request
Acronym Competition BPEL Business Process Execution Language
Acronym Competition SOA Service Oriented Architecture
What is SOA? A collection of loosely-coupled, distributed services which communicate and interoperate via agreed standards Source: Oxford University
SOA Principles • Reuseability • Service contract • loose coupling • Abstraction • Composability • Autonomous • Stateless • Discoverable
SOA and Web Services • Web Services are not inherently reusable • Web Services have service contracts • Web Services are loose-coupled • Web Services support abstraction • Web Services are naturally composable • Autonomy has to be designed in • Web Services support statelessness • Discoverability is beyond the scope of a Web Service
What is JSR 181? • Web Services Metadata for the Java Platform • Simplifies the Java Web service programming model by providing a set of annotations that can be used to declaratively specify the Web services of an application • JDK 5 or above • Specification released 27 Jun, 2005
JSR 181 @WebService ( serviceName = "annotatedBank", targetNamespace = "http://service.annotatedBank")public class BankServiceImpl {….
JSR 181 @WebMethod (operationName= "create-account")public String createAccount( @WebParam(name="accountName") String acctName,float initBalance) throws RemoteException,AccountException { return m_bank.addNewAccount( acctName,initBalance);}
WS-* • Set of 2nd generation Web Service standards • They start with WS- prefix
WS-* • Include: • Messaging Specifications • WS-Notification • WS-Addressing • WS-Transfer • WS-Eventing • WS-Enumeration
WS-* • Metadata Exchange Specifications • WS-Policy • WS-PolicyAssertions • WS-PolicyAttachment • WS-Discovery
WS-* • Security Specifications • WS-Security • WS-SecureConversation • WS-Trust • WS-Federation
WS-* • Include: • Reliable Messaging Specifications • WS-ReliableMessaging • WS-Reliablility
WS-* • Include: • Business Process Specifications • WS-BPEL • WS-Choreography • WS-CDL
WS-* • Include: • Transaction Specifications • WS-AtomicTransaction • WS-Coordination • WS-CAF • WS-Transaction • WS-Context • WS-CF
WS-* • Include: • Management Specifications • WS-Management • WS-ResourceTransfer
Orchestration • Web Service Orchestration enables web services to be strung together in predefined patterns and executed via ‘orchestration scripts’ • Typically owned by a business • “The heart of SOA”
Choreography Specification by the W3C defining a XML-based business process modeling language that describes collaboration protocols of cooperating Web Service participants, in which services act as peers, and interactions may be long-lived and stateful.
BPEL • Consortium originally made up of BEA (now Oracle), IBM and Microsoft • Provides a language defining process flow • Supports asynchronous operations and correlations • Supports long-running workflows
Reference Sites • www.WhatIsSOA.com • www.SOAPrinciples.com • www.WS-Standards.com • www.w3.org and www.ws-i.org • www.w3schools.com/webservices/default.asp • http://java.sun.com/webservices/ • http://www.oracle.com/technology/index.html • http://jbossws.jboss.org/mediawiki/index.php?title=JBossWS