Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS* Service-Oriented Computing

Similar presentations


Presentation on theme: "CIS* Service-Oriented Computing"— Presentation transcript:

1 CIS*6650.01 Service-Oriented Computing
Qusay H. Mahmoud, Ph.D. Qusay H. Mahmoud CIS*

2 Web Services… RPC the XML way (two ways) JAX-RPC, JAX-WS, …
1) XML-RPC (xml-rpc.com) 2) SOAP JAX-RPC, JAX-WS, … Document vs. RPC Style REST Web Services Architecture Qusay H. Mahmoud CIS*

3 XML-RPC A specification and implementation that enable applications running in a heterogeneous environment to make procedure calls over the Internet Defined at UserLand Software in 1998 Uses HTTP as the transport protocol and XML for encoding Designed to be as simple as possible, allowing complex data structures to be transmitted, processed, and returned Qusay H. Mahmoud CIS*

4 XML-RPC Not a solution to every problem.
Simple and effective mean for exchanging information (spec is less than 10 pages with examples and FAQ) "We wanted a clean, extensible format that's very simple. It should be possible for an HTML coder to be able to look at a file containing an XML-RPC procedure call, understand what it's doing, and be able to modify it and have it work on the first or second try... We also wanted it to be an easy to implement protocol that could quickly be adapted to run in other environments or on other operating systems." - xmlrpc.com Simplicity makes it limited Qusay H. Mahmoud CIS*

5 Sample XML-RPC request testcase.getMonthName(3) CIS*6650.01
Qusay H. Mahmoud CIS*

6 Sample XML-RCP Response Qusay H. Mahmoud CIS*

7 XML-RPC to Java Mapping
Explore mapping to other languages Qusay H. Mahmoud CIS*

8 SOAP A Lightweight XML-based protocol for exchanging information in a distributed environment More complex than XML-RPC (over 40 pages) Makes extensive use of XML namespaces and attribute specification tags in every element of a message Adds features that don’t exist in XML-RPC: user-defined data types, specify recipient, message specific processing control, and others Qusay H. Mahmoud CIS*

9 Sample See Week2 slides Qusay H. Mahmoud CIS*

10 Comparison XML-RPC vs. SOAP Qusay H. Mahmoud CIS*

11 XML-RPC vs. SOAP SOAP supports request routing and pre-processing of requests via SOAP headers XML-RPC is lighter, taking up less bandwidth, and requiring less processing power SOAP is namespace-aware (in fact every element must be namespace-qualified) SOAP has a heavy-weight, robust data typing mechanism based on XML Schemas XML-RPC is easily sent and consumed, and is easily readable by humans SOAP messages have a considerable amount of packaging contained in the envelope, but this allows for flexibility in the messaging paradigm used (publish-subscribe, point-to-point, etc.) Qusay H. Mahmoud CIS*

12 JAX-RPC The push for Java API started in 2001 as JSR-101 (jcp.org)
V1.0 released in 2003 Java primitives are tied to XML schema types Supports more Java standard library objects (e.g. BigInteger) Architects of JAX-RPC has XML-RPC and SOAP in mind Qusay H. Mahmoud CIS*

13 JAX-WS Next version of the spec is known as JAX-WS (JSR-224) Java API for XML-based Web Services Aims to reduce the complexity of web service development Java WSDP 1.6 (use GlassFish) Use JAX-RPC if: Using simple requests You control both the client/server You don’t need to publish WSDL Want to keep client-side parsing simple But remember…using standards is a good thing for interoperability (your apps need to interact with other third party apps) Qusay H. Mahmoud CIS*

14 Resources XML-RPC spec: xml-rpc.com/spec SOAP: w3.org/TR/soap
JAX-WS (JAX-RPC 2.0): (JSR 224: Apache XML-RPC: UserLand Frontier (frontier.userland.com) Many others…explore on your own Qusay H. Mahmoud CIS*

15 Document vs. RPC Style SOAP was originally designed to support RPC style Later (starting with SOAP 1.0), the spec expanded to support RPC and unstructured messages (document) RPC style: SOAP Body must conform to a structure that indicates the method name and a set of parameters Document style: SOAP Body can be structured in any way you like Qusay H. Mahmoud CIS*

16 Source: Anne Thomas Manes Blog, atmanes.blogsport.com
RPC vs. Document Style Source: Anne Thomas Manes Blog, atmanes.blogsport.com Message encoding: literal means Body contents conform to a specific XML Schema, SOAP encoding uses a set of rules based on XML Schema data types to encode the data RPC: includes an operation name or place holder and document style doesn’t (significant architectural style) This document style example uses a state transfer style See more examples: Qusay H. Mahmoud CIS*

17 State Transfer Style Such as MOM (Message-Oriented Middleware), pipe-and-filter Architectural constraint: all components expose the same application interface Through a single operation such as “process Data” If a server exposes this operation, any client can submit data to it for processing Since there is one operation, its use is implicit and doesn’t need to be included in the message Qusay H. Mahmoud CIS*

18 REST REpresentational State Transfer An architectural style
Think of it as a design pattern Underlying concept for today’s Web architecture Every distinguishable entity is a resource URLs identify resources An approach for creating Web services Qusay H. Mahmoud CIS*

19 REST See the slides from http://www.xfront.com/REST.ppt CIS*6650.01
Qusay H. Mahmoud CIS*

20 When to use REST or SOAP REST SOA
The web services are stateless A caching infrastructure can be leveraged Service’ producer and consumer have mutual understanding of the context and content being passed along Bandwidth is limited Web service delivery into exiting web sites can be enabled easily with a RESTful style SOA A formal contract must be established to describe the interface that the Web service offers The architecture must address complex non-functional requirements The architecture needs to handle asynchronous processing and invocation See details at: (read the section When to use REST) Qusay H. Mahmoud CIS*

21 Web Services Architecture
Provides a common definition of a Web service, and defines its place within a larger Web services framework to guide the community Provides a conceptual model and a context for understanding Web services and the relationships between the components of this model Defines minimal characteristics common to all Web services, and characteristics that are needed by some but not all Web services Doesn’t specify how Web services are implemented Qusay H. Mahmoud CIS*

22 Web Services Architecture
Four models: Message-Oriented, Service-Oriented, Resource-Oriented, Policy) Core concepts and relationships of WS Source: Qusay H. Mahmoud CIS*


Download ppt "CIS* Service-Oriented Computing"

Similar presentations


Ads by Google