Transcript Yongqun He

Web Services
Part II
Yongqun He
J2EE-based Web Services
Types in Client Tier
Type of client
Examples
How this client connects
Business
Partners
Distributors, resellers, large
customers
XML-based web services
technologies (SOAP, UDDI,
WSDL, ebXML)
Thin Clients
Web browsers, PDAs,
wireless devices
Lightweight protocol (HTTP)
Thick Clients
Applets, applications,
existing systems
Heavyweight protocol (IIOP)
** PDAs: Personal Digital Assistants
** Thick Clients: e.g. within a company’s internal LAN topology.
May use more efficient protocol such as Java RMI-IIOP (Java Remote
Method Invocation over the Internet Inter-ORB Protocol).
Using JAXR,UDDI, and WSDL
** JAXR (Java APIs for XML Registries) For publishing,
querying, & editing
An EJB Business Layer
JAX* APIs to Invoke a Business
Web Service




The Java API for XML registries (JAXR): look up the
business partner’s web service that is published in a UDDI
registry.
The Java API for XML RPC (JAX/RPC): perform RPC
requests to the external web service.
The Java API for XML Messaging (JAXM): send SOAP
or ebXML messages to the external web service.
The Java API for XML parsing (JAXP) and the Java
API for XML Binding (JAXB): transform Java data into
an XML format suitable for the partner; convert the
received XML data back into a Java language construct;
perform XSLT transforms to convert schemas.
JAX* APIs to Invoke Business Web Service
Relationship of Web Services Architecture to
MS Windows DNA (n-tier) Architecture
Microsoft.NET-based Web Services
Analogies between J2EE and .NET
Feature
J2EE
.NET
Type of technology
Standard
Product
Middleware Vendors
30+
Microsoft
Interpreter
JRE
CLR
Dynamic Web Pages
JSP
ASP.NET
Middle-Tier
Components
EJB
.NET Managed Components
Database access
JDBC SQL/J
ADO.NET
SOAP, WSDL,
UDDI
Yes
Yes
Implicit middleware
(load-balancing, etc)
Yes
Yes
More Components



XLANG: used by web services to perform
complex undo operations.
XAML (Transaction Authority Markup
Language): provides a more traditional twophase commit style transactional semantics
over web services.
XLANG/XAML provides transactional support
for complex web transactions involving
multiple web services.
More Components (cont’d)

XKMS (XML Key Management
Specification): ongoing work by Microsoft
and Verisign to support authentication and
registration.


Key idea: delegate the signature processing to a trust
server on the web. Rely on XML signature and
encryption specification by W3C.
Two parts:


X-KISS (XML Key information Service Specification)
X-KRSS (XML Key Registration Service Specification)
ebXML (e-business XML)



A suite of XML specifications and related
processes and behavior designed to
provide an e-infrastructure for B2B
collaboration and integration.
Enables enterprises of any size and in any
geographical location to conduct business
over the Internet.
Sponsored by UN/CEFACT and OASIS.


UN/CEFACT: United Nations Center for Trade
Facilitation and Electronic Business
OASIS: Organization for the Advancement of
Structured Information Standards
ebXML (e-business XML)

Key components:





Collaboration Protocol Profile (CPP): describes a
company’s offerings in a standard, portable way.
Collaboration Protocol Agreement (CPA):
describes the exact requirements and mechanisms
for the transactions.
Business Process and Information Modeling: in
XMLCore Components: a set of XML schemas
Messaging: built on top of SOAP-encapsulated
message-passing invocations; extend SOAP by
adding layered frameworks.
Registry/Repository: a service that stores CPPs,
CPAs, core components, and other ebXML documents
and fragments.
Dynamic e-business

Definition: the next generation of e-business focusing
on the integration and infrastructure complexities of B2B
by leveraging the benefits of Internet standards and
common infrastructure to produce optimal efficiencies for
intra- and inter-enterprise computing.

Service-Oriented Architecture (SOA):
conceptual architecture for implementing dynamic ebusiness.

SOA includes three participants and three
fundamental operations.
SOA Architecture
** Service providers publish services to a service broker.
Service requesters find required services using a Service
Broker and bind to them.
Comparison with CORBA/DCOM


Competing approaches
Using the same principles



CORBA/DCOM success is limited



Discovery of distributed services
Interaction through a common protocol
Dependent on vendor’s implementation
Weak for client-to-server communications, esp.
when the client machines are scattered across
the Internet.
Web Services: existing Internet standards or
widely-accepted specifications: HTTP, XML, SOAP,
WSDL, UDDI.
References

A Web Services Primer:
http://www.xml.com/lpt/a/2001/04/04/webservices/index.html

Developer’s Guide to Building XML-based Web Services:
http://www.theserverside.com/resources/article.jsp?l=WebServices
-Dev-Guide

Getting Started on Developing Web Services:
http://dcb.sun.com/practices/howtos/developing_webserv.jsp

A Platform for Web Services:
http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnwebsrv/html/websvcs_platform.asp

J2EE vs. Microsoft.NET:
http://www.theserverside.com/resources/articles/J2EE-vsDOTNET/article.html

IBM Web Services Zone:
http://www-106.ibm.com/developerworks/webservices/