Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

24
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein Hussein

Transcript of Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Page 1: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Web Services

Mohamed Fahmy Dr. Sherif AlyHussein Hussein

Page 2: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

What is Web services ?

• A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system.

• Web Services are intended to provide global distributed applications through which an inventory system in Singapore can be combined with an order processing system in London to handle orders placed by someone in Chicago.

Page 3: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Web Services Characteristics

• Loose coupling

• Well-defined interfaces

• Stateless service design

• Supports Remote Procedure Calls (RPCs)

• Supports document exchange

Page 4: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Web Services Interactions

• Because all communication is in XML, web services are not tied to

any one operating system or programming language

Page 5: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Advantages of Web Services

• Web services provide interoperability between various software applications running on disparate platforms.

• By utilizing HTTP, web services can work through many common firewall security measures without requiring changes to the firewall filtering rules. Other forms of

RPC may more often be blocked.

• Web services allow software and services from different companies and locations to be combined easily to

provide an integrated service.

Page 6: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Advantages of Web Services (cont’d)

• Web services allow the reuse of services and components within an

infrastructure.

• Loosely coupled thereby facilitating a distributed approach to application

integration.

Page 7: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Disadvantages of Web Services

• Web services standards such as transaction are still nonexistent compared to more mature distributed computing open standards such as

CORBA.

• Web services may suffer poor performance compared to other distributed computing

approaches such as RMI, CORBA, or DCOM.

Page 8: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Web services compared to RMI and CORBA

• The use of HTTP and XML supports increased interoperability, but also represents a

significant increase in run-time cost for the web service compared to RMI and CORBA

Page 9: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Web Services consist of:

Page 10: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

UDDI

• UDDI (Universal Description, Discovery and Integration)

• The UDDI Project is an industry initiative that is working to enable businesses to quickly, easily, and dynamically find and transact with one another.

• UDDI provides a yellow pages directory for Web Services so that the potential users (clients/consumers) can locate the needed services.

Page 11: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

WSDL

• WSDL (XML Web Services Description Language)

• Its an XML Based Language for describing web services and how to access them

• WSDL contain information about what Web Service does, how it communicates, and where it resides

• It is used by the client to open and access the Web Service

Page 12: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

SOAP

• SOAP (Simple Object Access Protocol) through which XML Web Service consumers can send and receive messages (transfer) using XML.

• It is a message layout specification that defines a uniform way of passing XML-encoded data.

• SOAP provides an explicit serialization (HTTP + XML description) protocol used in service exchanges.

Page 13: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

XML and HTTP

• XML & HTTP are the core open Internet technologies that are the foundation of XML Web Services.

Page 14: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

How it Works

Page 15: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Web Service Architecture

Page 16: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

How to use and create A web serivce You have to have jdk 1.5 installed on the machine Next you download java Web Services Developer Pack

2.0 (Java WSDP) Used to build, test and deploy XML applications, Web

services, and Web applications

• WSDP includes:– Java APIs for XML (JAX) that are in the Java XML Pack– Apache Tomcat server– And Other components needed to provide a fully functional

environment for developing and testing Web services OR You can install j2EE which has all of this bundled

including the (Sun Java System Application Server PE 8.2 Web Container)

Page 17: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

The JAX Pack

The Java XML (JAX) Pack provides the core set of APIs that facilitate the building of Web services in Java.

The JAX Pack is a set of Java APIs that includes the Java APIs for XML Processing (JAXP) Messaging (JAXM), the Java API for XML-

based RPC (JAX-RPC) SOAP with Attachments API for Java

(SAAJ) Java API for XML Registries (JAXR),

Page 18: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

the Java APIs for XML Processing (JAXP)• supports the processing of XML

documents using Document Object Model (DOM),

• JAXP enables applications to parse and transform XML documents independent of a particular XML processing implementation.

• JAXP lets you use any XML-compliant parser or XSL processor from within your application and supports the W3C schema

Page 19: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Messaging (JAXM),

• The Java Message Service (JMS) API is a messaging standard that allows J2EE application components to create, send, receive, and read messages

• It enables distributed communication that is loosely coupled, reliable, and asynchronous.

Page 20: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

the Java API for XML-based RPC (JAX-RPC)• uses the SOAP standard and HTTP, so

client programs can make XML-based remote procedure calls (RPCs) over the Internet

• JAX-RPC also supports WSDL, so you can import and export WSDL documents

• With JAX-RPC and a WSDL, you can easily interoperate with clients and services running on Java-based or non-Java-based platforms such as .NET. For example,

Page 21: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

SOAP with Attachments API for Java (SAAJ) • is a low-level API on which JAX-

RPC depends• SAAJ enables the production and

consumption of messages that conform to the SOAP 1.1 specification

• Most developers do not use the SAAJ API, instead using the higher-level JAX-RPC API.

Page 22: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Java API for XML Registries (JAXR)• lets you access business and

general-purpose registries over the web

• JAXR supports the ebXML Registry and Repository standards and the emerging UDDI specifications

• businesses can submit material to be shared and search for material that others have submitted

Page 23: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Finally

• Web Services is becoming more and more widely spread due to the need for distributed computing and the availability of a more reliable internet.

• It also decreases the amount of programming needed letting developers focus more on the business logic.

Page 24: Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.

Questions