Object Models for Distributed Systems

Download Report

Transcript Object Models for Distributed Systems

Presentation 8:
SOAP in a distributed object framework,
Application Servers & AXIS SOAP
Outline
• SOAP and Web Services in relation to Distributed
Objects
• The AXIS Project – Open Source Java SOAP
Server
– Introduction to the Apache Tomcat Application Server
– Introduction to the AXIS Project
– How to install
Slide 2 af 14
Ingeniørhøjskolen i Århus
SOAP & Web Services in relation to
Distributed Objects
SOAP and Distributed Objects
• SOAP in it self has nothing to do with objects
• There probably is SOAP API’s for C and COBOL
• The trick is the supporting API’s converting
objects to WSDL and SOAP for serialization
across the network
• Using the Proxy Pattern for decoupling – perhaps
with the Façade Pattern for larger granularity
– Emmerich: Accessing distributed objects is expensive
– Use larger granularity
• More on Architechure later in the course
Slide 4 af 14
Ingeniørhøjskolen i Århus
Proxy Pattern (GoF version)
Watch
Client
abstract
setTime()
ProxyWatch
setTime()
RealWatch
setTime()
TestWatch
setTime()
Objects of RealWatch class are locateed on a different machine
than the Client object.
This is an example of Remote Proxy – which is an
Architectural Pattern. from GoF
GoF: Gang Of Four (Design Pattern bog af Gamma m.fl.)
Slide 5 af 14
Ingeniørhøjskolen i Århus
Proxy Pattern (B. Douglas version)
Client component
Proxy
Pattern
Client
Object
Client
Server
Proxy
SOAP
Proxy
Server
object
Server component
We could do the same for
The Server object
BD.s212
By encapsulating
The SOAP
communication
in a Proxy,
we have
decoupled the
Client Object from
needing to know
that it calls over
The Internet.
Thus making it easy
to implement
different Middleware
and use the Server
object locally
Proxy (= en stedfortræder)
Slide 6 af 14
Ingeniørhøjskolen i Århus
Façade Pattern (also GoF)
Used for encapsulation and decoupling
The entire Client Subsystem is decoupled from the server
and a Client Proxy hides the SOAP implementation (also Server Proxy)
This is known as Client Stubs & Server Skeletons
Slide 7 af 14
Ingeniørhøjskolen i Århus
Frameworks for Webservices &
The AXIS Project – Open Source
Java SOAP Server
How to make a Webservice with SOAP
• You need an application or API capable of supporting:
–
–
–
–
Communication over the Internet (HTTP)
Security (SSL)
XML Parsing capabilities
…
• Two examples of this:
– Apache Tomcat Application Server with AXIS
– Microsoft Internet Information Server
• We will use them both – though starting with the Apache
Tomcat Application Server and the AXIS project – this will
be introduced here
Slide 9 af 14
Ingeniørhøjskolen i Århus
Apache Tomcat Application Server
• Apache Project is a open source project – widely
supported by Sun & IBM (but not Microsoft)
– Including a huge amount of free coding effort from both
• It consist of a long range of projects including:
– Apache Web Server
•
•
•
•
The most used web server in the world (and its free!)
The most secure, with SSL cap., and NT, Linux & UNIX support
Huge amount of ”plug-in” modules
One of theese being the Apache Tomcat AS
– Apache Tomcat Application Server
• Capable of running JAVA applications
• JSP/Servlets
• And projects embedded into this –
– The AXIS Project
• The former Apache SOAP Server
• Runs embedded in Tomcat
Slide 10 af 14
Ingeniørhøjskolen i Århus
Apache Tomcat AS
• Works on:
– Windows, UNIX, LINUX, Mac
– Can be compiled to any platform (with some work)
• Can be found at:
– http://jakarta.apache.org/tomcat/index.html
• Server listening for events:
– HTTP on port 8080 (optionel)
– Executes Servlets/JSP and JAVA applications
– AXIS is an embedded project within the Tomcat environment
Common code base!
SOAP Client
Java, C++, C#,
Delphi, VB
Application
SOAP over HTTP
Web Server
Apache /
MS IIS
Slide 11 af 14
AS/SOAP
Server
(Tomcat
with
AXIS)
JSP/
Servlet
Object
Web
Service
Object
Ingeniørhøjskolen i Århus
AXIS Project
• Provides us with a suitable framework
• Runs embedded in Apache Tomcat – just download
– http://xml.apache.org/axis/
• But can run on ANY Application Server
– BEA, WebSphere,
• Supports full WSDL
• Supports SOAP communication via:
– HTTP, SMTP, FTP and open for extension
• Build in security, log, error and fault handling (some are still “under
construction”)
• Tools for WSDL Stub & Skeleton creation:
– WSDL2Java &
– Java2WSDL
• Flexible deployment system
Slide 12 af 14
Ingeniørhøjskolen i Århus
The AXIS Project – How to Install
How to Install
• We do not need the Apache Web Server
– As Tomcat has its own HTTP capabilities
• Start with Apache Tomcat Application Server
– http://jakarta.apache.org/tomcat/index.html
• Test installation is OK
• Then Install the AXIS Project
– http://xml.apache.org/axis/
• I have prepared a brief installation help document
to be found at the course web site
Slide 14 af 14
Ingeniørhøjskolen i Århus