jra 1 ITCZ Meeting 8 9062004 www euegee

  • Slides: 40
Download presentation
jra 1 IT-CZ Meeting, 8 -9/06/2004 www. eu-egee. org Web Services Survey Giuseppe Avellino

jra 1 IT-CZ Meeting, 8 -9/06/2004 www. eu-egee. org Web Services Survey Giuseppe Avellino EGEE is a project funded by the European Union under contract IST-2003 -508833

Contents Web Services • General Knowledge • Application Servers and tools: Java § J

Contents Web Services • General Knowledge • Application Servers and tools: Java § J 2 EE § Axis Java § JBoss C++ § Axis C++ § g. SOAP Python § SOAPpy Still under evaluation: WSIF XDoclet jra 1 IT-CZ Meeting, 8 -9/06/2004 - 2

General Knowledge Distributed objects/services general common access model: Distributed Object (service) Client Remote Interface

General Knowledge Distributed objects/services general common access model: Distributed Object (service) Client Remote Interface Skeleton Stub Network (Internet, LAN, . . . ) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 3

General Knowledge When use a Web service architecture? In many situations, other technologies may

General Knowledge When use a Web service architecture? In many situations, other technologies may be a more appropriate solution (e. g. CORBA, RMI-IIOP, …) Some guide lines helping in choosing or not a Web Server architecture solution are: § Interoperability requirements § Accessibility requirements § Integration requirements (different kinds of Information Systems) § Types of clients one wants to support (e. g. Wireless, PDAs, . . . Web services are platform independent) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 4

General Knowledge What is the better way to implement a Web service? Some guide

General Knowledge What is the better way to implement a Web service? Some guide lines are: § Provider support § WSDL generation § Code generation § Deployment characteristics § § Security Reliability Scalability Performance § Parser performance § Clustered Applications § Asynchronous services jra 1 IT-CZ Meeting, 8 -9/06/2004 - 5

General Knowledge The World Wide Web Consortium (W 3 C) organization defines a Web

General Knowledge The World Wide Web Consortium (W 3 C) organization defines a Web Service as: “A Web Service is a software system identified by a URI whose public interfaces and bindings are defined and described using XML. Its definition can be discovered by other software systems. These systems may then interact with the Web Service in a manner prescribed by its definition, using XML-based messages conveyed by Internet protocols”

General Knowledge W 3 C definition means: • Clients access Web services using an

General Knowledge W 3 C definition means: • Clients access Web services using an URL and an XML-based protocol such as SOAP, sent by an Internet protocol such as HTTP (SMTP, FTP, . . . ) § SOAP (communication protocol - used to define data type mapping and a common messaging format to write messages with XML language) § HTTP (transfer protocol) • Clients access Web services through services interfaces defined using XML based languages such as WSDL § XML (used as a common language) § WSDL (XML-based language to describe Web service details and how to access the service) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 7

General Knowledge • Web services are services offered through the Web • Web services

General Knowledge • Web services are services offered through the Web • Web services technologies allow enterprises to expose applications as services accessible via Internet • Web services provide a way to offer application-toapplication comunication running on different platforms (interoperability) A Web services can be used to: • Provide a functionality over the Web • Communicate with other applications over a nework jra 1 IT-CZ Meeting, 8 -9/06/2004 - 8

General Knowledge The most important characteristic of Web services is they can be offered

General Knowledge The most important characteristic of Web services is they can be offered (exposed) regardless: § Services implementation § Programming language § Computer platform § Transport mechanism jra 1 IT-CZ Meeting, 8 -9/06/2004 - 9

General Knowledge A Service Oriented Architecture is composed of: § A Service implementing the

General Knowledge A Service Oriented Architecture is composed of: § A Service implementing the business logic exposed through well-defined interfaces § A Registry where services are published providing the specific interface (e. g. UDDI, eb. XML) § Client who access the registry to find services to use (interface description) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 10

General Knowledge Request Service Info (WSDL) Web Service Client Download WSDL Send SOAP messages

General Knowledge Request Service Info (WSDL) Web Service Client Download WSDL Send SOAP messages with XML document UDDI Registry WSDL Web Service jra 1 IT-CZ Meeting, 8 -9/06/2004 - 11

General Knowledge Web Service Impl. Generate WSDL from code Web Service Skeleton Client Iml.

General Knowledge Web Service Impl. Generate WSDL from code Web Service Skeleton Client Iml. Generate Skeleton WSDL Publish a service (description) Client Stub (Proxy) Invoke a Web Service Generate Stub UDDI Retrieve a service (description) WSDL SOAP jra 1 IT-CZ Meeting, 8 -9/06/2004 - 12

General Knowledge Web services Pros: • Interoperability • They are more firewall friendly •

General Knowledge Web services Pros: • Interoperability • They are more firewall friendly • They are capable to easily switching configuration • They could be realized to be used by a Browser (accessibility) • They doesn’t require changes to the Web infrastructure Web services Cons: • Security (Denial of Service - Do. S) • They require more processing time then traditional computing environments • Web Services are based on XML, this affects performance and introduce a very verbose format (big payload) • Reliability is not so easy to achieve because HTTP is unreliable Important issues: scalability, load balancing, failover (clustered applications) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 14

General Knowledge • Web services are a new way to provide services. The technology

General Knowledge • Web services are a new way to provide services. The technology is evolving; it could be not so simple to choose among different available possibilities • Web services are tightly connected to different technologies, standards and specification in order to provide interoperability, O. S. and programming languages independence • New standards are currently being defined • Some opened issues are: § Interoperability § Coordination of multiple services to implement the Business Logic § Security (even if OASIS has approved WS-Secure as a standard, an integrated security model is far to be defined) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 15

J 2 EE Platform Architecture An Application Server is J 2 EE based if

J 2 EE Platform Architecture An Application Server is J 2 EE based if it supports server side components such as EJBs, servlets and JSPs EJB Container (business components) Servlet/JSP Container (Web components) Resource APIs (JAX-RPC, SAAJ, . . . ) Java Runtime Environment Basic aims: • Components portability • Interoperability among J 2 EE based platforms jra 1 IT-CZ Meeting, 8 -9/06/2004 - 16

J 2 EE Web service tipical architecture: HTTP Request SOAP Request Servlet Web Browser

J 2 EE Web service tipical architecture: HTTP Request SOAP Request Servlet Web Browser JSP HTTP Response (HTML) Client Web Service SOAP Response (XML) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 17

J 2 EE Application Server (JWSDP) is the SUN standard J 2 EE based

J 2 EE Application Server (JWSDP) is the SUN standard J 2 EE based application server. J 2 EE provides support to develop server-side and client-side Web services and distributed, multi-tier applications Available API’s: • JAXP – Java API for XML Processing. Lightweight APIs for parsing or processing XML document. JAXP allows the use of other vendors parser. It uses SAX and DOM models • JAX-RPC – Java API for XML-based RPC, used to support RPC for Java. Remote calls can be done with three different modes: § Synchronous Request-Response mode § One-Way RPC mode § Non-Blocking RPC Invocation mode (Asynchronous mode) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 18

J 2 EE • JAXR – Java API for XML Registries • SAAJ –

J 2 EE • JAXR – Java API for XML Registries • SAAJ – SOAP with Attachments API for Java. It allows to produce and consume SOAP messages with attachment (XML document or fragment, MIME type). Two available modes: § Synchronous Request-Response messaging § One-Way Asynchronous messaging J 2 EE offers three different ways to implement a client: • Static Stub – a Java class statically connected to the endpoint interface • Dynamic Proxy – dynamic endpoint interface support at runtime • Dynamic Invocation Interface (DII) – defines a dynamic Call object. It has to be configured before use, but this way, changes on the server side don’t affect the client side jra 1 IT-CZ Meeting, 8 -9/06/2004 - 19

J 2 EE SOAP • Support for SOAP 1. 1/1. 2 • Support for

J 2 EE SOAP • Support for SOAP 1. 1/1. 2 • Support for the SOAP with Attachments specification (SAAJ) • Providers for RPC and message based SOAP services Transport • HTTP servlet-based transport • JMS based transport Web Service Description Language (WSDL) • Support for the WSDL • Automatic WSDL generation • wscompile tool for building WSDL file and mapping file (Java – WSDL) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 20

J 2 EE Types and Java Beans • Support for all basic types and

J 2 EE Types and Java Beans • Support for all basic types and complex types • EJB container is provided Security and Persistence • Security model based on the Java Servlet specification • Support for HTTPS (SSL/TLS) via Tomcat Deployment • Custom deployment via an XML deployment descriptor file • wscompile tool for building client stub • wsdeploy tool for building server tie • deploytool to deploy Web services • Self-contained Web application (WAR - Web Application Archive) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 21

J 2 EE • J 2 EE includes: § A stand-alone server § A

J 2 EE • J 2 EE includes: § A stand-alone server § A tool for deploying § Java Blue. Prints guidelines • J 2 EE addresses the WS-I Basic Profile specification J 2 EE most important features are: • Portability. J 2 EE adds portability to Web services • Reusability. J 2 EE allows component base development (reusability of components) • Scalability. J 2 EE containers provide a mechanism that supports simplified scaling of distributed applications jra 1 IT-CZ Meeting, 8 -9/06/2004 - 22

J 2 EE • J 2 EE Pros: § Complete set of APIs provided

J 2 EE • J 2 EE Pros: § Complete set of APIs provided § Deploy tool provided § Provider and Java Community support • J 2 EE Cons: § Security issues jra 1 IT-CZ Meeting, 8 -9/06/2004 - 23

Axis Java Axis (Apache e. Xtensible Interaction System) Java is an implementation of the

Axis Java Axis (Apache e. Xtensible Interaction System) Java is an implementation of the SOAP (SOAP engine) used to implement Java Web services. It is a framework for constructing clients and servers processing SOAP • Axis includes: § A stand-alone server (with HTTP support; alternative to servlet-based servers such as Tomcat) § A server capable to use different servlet engines such as Tomcat § A tool that generates Java classes from WSDL § A tool for monitoring TCP/IP packets (the tool monitors SOAP request/response messages) • Axis addresses the WS-I Basic Profile and JAX-RPC specifications jra 1 IT-CZ Meeting, 8 -9/06/2004 - 24

Axis Java Axis most important features are: § Performance. Axis uses SAX parsing (event

Axis Java Axis most important features are: § Performance. Axis uses SAX parsing (event based, faster than § § DOM) Flexibility. Axis architecture is extendible Stability. Axis defines a set of published interfaces which change slowly Component-oriented deployment. You can implement common patterns of processing for your applications Transport framework. Axis has a simple abstraction for designing transports (i. e. SOAP senders and listeners over various transport protocols). The core of the engine is completely transportindependent jra 1 IT-CZ Meeting, 8 -9/06/2004 - 25

Axis Java SOAP • Support for SOAP 1. 1/1. 2 • Support for the

Axis Java SOAP • Support for SOAP 1. 1/1. 2 • Support for the SOAP with Attachments specification (SAAJ) • Providers for RPC and message based SOAP services Transport • HTTP servlet-based transport • JMS based transport • SMTP, FTP based transport Web Service Description Language (WSDL) • Support for the WSDL • Automatic WSDL generation from deployed services • WSDL 2 Java tool for building Java proxies and skeletons from WSDL documents • Java 2 WSDL tool for building WSDL from Java classes jra 1 IT-CZ Meeting, 8 -9/06/2004 - 26

Axis Java Types and Java Beans • Support for all basic types • Automatic

Axis Java Types and Java Beans • Support for all basic types • Automatic conversions between Java Collections and SOAP Arrays • Automatic Serialization/Deserialization of Java Beans • An EJB provider for accessing EJBs as Web Services (no code) Security and Persistence • Preliminary security extensions • Support for session-oriented services, via HTTP cookies or transportindependent SOAP headers Deployment • Support for JWS deployment of SOAP services (instant deployment) • Custom deployment via a deployment descriptor file (WSDD) • Self-contained Web application jra 1 IT-CZ Meeting, 8 -9/06/2004 - 27

Axis Java • Axis Pros: § Architecture design § Large number of unit tests

Axis Java • Axis Pros: § Architecture design § Large number of unit tests § Support of JAX-RPC and SAAJ • Axis Cons: § Asynchronous request/response message processing not yet supported (and maybe not in the early future) § Security issues jra 1 IT-CZ Meeting, 8 -9/06/2004 - 28

JBoss was created as an Enterprise Java Beans container. Now is a complete J

JBoss was created as an Enterprise Java Beans container. Now is a complete J 2 EE Application Server • JBoss architecture consists of a “microkernel” and a set of components giving a very flexible way to configure • JBoss supports clustered Stateless Session Beans, Stateful Session Beans and Entity Beans • JBoss partially supports JMS and Message Driven Beans • JBoss includes: § Tools § Developing libraries § Tomcat container jra 1 IT-CZ Meeting, 8 -9/06/2004 - 29

JBoss most important features are: § Performance. JBoss offers improved performance respect other §

JBoss most important features are: § Performance. JBoss offers improved performance respect other § § J 2 EE application servers Memory Usage. JBoss microkernel has a low memory overhead Modular Architecture. JBoss is composed by a microkernel and a set of pluggable component services (SOA – Services Oriented Architecture) Security. JBoss grants full security implementation and JAAS (Java Authentication and Authorization Service) integration Scalability. JBoss has a good level of scalability and offers full clustering of any Java object jra 1 IT-CZ Meeting, 8 -9/06/2004 - 30

Axis C++ is a SOAP implementation done in C++ • Axis C++ has adopted

Axis C++ is a SOAP implementation done in C++ • Axis C++ has adopted the general architecture of Axis Java, but it introduces several core architectural features realized to increase performance • Axis C++ has the same features of Axis Java: speed, flexibility, and so forth • Axis C++ includes: § A stand-alone server (with HTTP support) § Web server modules for Apache HTTP server § A tool that generates basic wrapper classes jra 1 IT-CZ Meeting, 8 -9/06/2004 - 31

Axis C++ SOAP • Support for SOAP 1. 1/1. 2 • SOAP engine with

Axis C++ SOAP • Support for SOAP 1. 1/1. 2 • SOAP engine with both client and server support Web Service Description Language (WSDL) • Support for the WSDL • WSDL 2 WS tool for building C/C++ components from WSDL • WSDL 2 WS tool for generating wrappers that act as RPC Providers Types • Support for all basic types, complex types and arrays • Serialization/Deserialization Deployment • Custom deployment via a deployment descriptor file (WSDD) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 32

g. SOAP provides a set of tools to develop Web services application in C/C++

g. SOAP provides a set of tools to develop Web services application in C/C++ • g. SOAP provides a C/C++ SOAP API that hides SOAP details • g. SOAP compiler, to generate stub and skeleton, automatically maps native and user C/C++ data types to XML data types • g. SOAP includes: § A stand-alone server (with HTTP/1. 1, HTTPS support) § Apache module for Apache HTTP server § CGI and Fast. CGI interfaces • g. SOAP addresses the WS-I Basic Profile specification jra 1 IT-CZ Meeting, 8 -9/06/2004 - 33

g. SOAP most important features are: § Performance. g. SOAP uses streaming XML parsing

g. SOAP most important features are: § Performance. g. SOAP uses streaming XML parsing techniques (g. SOAP seems to be the fastest SOAP compliant C/C++ implementation available) § Memory Usage. g. SOAP has a very low memory overhead. Clients and servers can be created with a low total memory footprint g. SOAP memory management uses garbage collection § Efficiency. g. SOAP has a very low SOAP RPC latencies (important for real-time applications) § Scalability. g. SOAP has an high level of scalability jra 1 IT-CZ Meeting, 8 -9/06/2004 - 34

g. SOAP • Support for SOAP 1. 1/1. 2 • Providers for RPC and

g. SOAP • Support for SOAP 1. 1/1. 2 • Providers for RPC and message based SOAP services • SOAP Fault and Header processing Transport • HTTP transport (HTTP/1. 1) Web Service Description Language (WSDL) • Support for the WSDL • Automatic WSDL generation • wsdl 2 h tool to convert WSDL into header file specifications of Web services • soapcpp 2 tool to generate the stub and skeleton source code jra 1 IT-CZ Meeting, 8 -9/06/2004 - 35

g. SOAP Types • Support for all basic and complex types • Serialization/Deserialization Security

g. SOAP Types • Support for all basic and complex types • Serialization/Deserialization Security and Persistence • HTTP/1. 1 keep-alive support • Support for session-oriented services, via HTTP cookies or transportindependent SOAP headers • Support for HTTPS (SSL/TLS) • Globus GSI plug-in available Deployment • No need to rewrite C/C++ applications for Web service deployment (sometimes, if one need serialization) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 36

g. SOAP • g. SOAP Pros: § Persistence § Globus GSI plug-in available •

g. SOAP • g. SOAP Pros: § Persistence § Globus GSI plug-in available • g. SOAP Cons: § Generated code § Provider support jra 1 IT-CZ Meeting, 8 -9/06/2004 - 37

SOAPpy SOAP • Support for SOAP 1. 1 Web Service Description Language (WSDL) •

SOAPpy SOAP • Support for SOAP 1. 1 Web Service Description Language (WSDL) • Support for WSDL • WSDL. Proxy API: § Parse WSDL document § Discover SOAP-based services published APIs § Translate them into Python applications Types • Support for all basic types • Does not support complex types Deployment • No deploy tool provided (py 2 wsdl) jra 1 IT-CZ Meeting, 8 -9/06/2004 - 38

SOAPpy • SOAPpy Pros: § Easy & Quick-Writing (4 -5 code lines for simple

SOAPpy • SOAPpy Pros: § Easy & Quick-Writing (4 -5 code lines for simple service) § No Compilation Required • SOAPpy Cons: § Dynamic types: WSDL hand-writing add (a, b): return (a + b) can be anything § Still new product, not yet standardized § Provider support jra 1 IT-CZ Meeting, 8 -9/06/2004 - 39

WSIF • Apache WSIF (Web Services Invocation Framework) is a WSDL based • •

WSIF • Apache WSIF (Web Services Invocation Framework) is a WSDL based • • • API (Java) for invoking Web services WSIF enables developers to interact with Web services through WSDL instead working with SOAP APIs directly WSIF is very flexible: it has a pluggable architecture with "providers" to handle invocations (dynamic) according to a specific protocol. There is a separation between APIs and protocol to be used WSIF includes providers for SOAP (using Axis), local java classes, EJBs, JMS services and applications WSIF allows clients to be unaware of changes to services such as service migration, change of protocols, new providers and so forth (no needs to recompile client code) WSIF allows stubless or completely dynamic invocation of a Web service, based upon examination of the meta-data about the service at runtime jra 1 IT-CZ Meeting, 8 -9/06/2004 - 40

XDoclet • XDoclet is a code generation tool based on Attribute-Oriented • • Programming.

XDoclet • XDoclet is a code generation tool based on Attribute-Oriented • • Programming. It helps to code J 2 EE applications XDoclet is composed by a core and a set of modules XDoclet enables developers to add meta data (attributes) to java sources, inserting specific Java. Doc tags XDoclet generates XML descriptor file and source code referring to a defined template that use information provided by the code and the tags Currently XDoclet can only be used in conjunction with Ant XDoclet most important features are: § Deployment configuration information are shown inside the code § Development time reduced § Redundant work reduced jra 1 IT-CZ Meeting, 8 -9/06/2004 - 41