Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.

Similar presentations


Presentation on theme: "Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP."— Presentation transcript:

1 Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP

2 Ingeniørhøjskolen i Århus Slide 2 af 20 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 code a very simple example –How to install

3 SOAP & Web Services in relation to Distributed Objects

4 Ingeniørhøjskolen i Århus Slide 4 af 20 SOAP and Distributed Objects SOAP in it self has nothing to do with objects There probably is SOAP API’s for C and COBOL –actually this also holds true for CORBA – king of OO-middleware The trick is the supporting API’s converting objects to WSDL and SOAP for serialization across the network Using the Proxy Pattern for decoupling We shall be looking at Microsofts.NET Web service technology (using Microsoft Visual Studio.NET) at a later point, while we now will focus on the open source community, targeting specifically Java with the AXIS toolkit

5 Frameworks for Web Services & The AXIS Project – Open Source Java SOAP Server

6 Ingeniørhøjskolen i Århus Slide 6 af 20 How to make a Web service with SOAP You need an application or API capable of supporting: –Communication over the Internet (HTTP) –Security (SSL) –XML Parsing capabilities –Tools for WSDL handling / stub generation –and more 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 –Other Web service frameworks: AXIS for C++ Sun’s Java Web Services (http://java.sun.com/webservices/index.jsp)http://java.sun.com/webservices/index.jsp

7 Ingeniørhøjskolen i Århus Slide 7 af 20 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

8 Ingeniørhøjskolen i Århus Slide 8 af 20 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.htmlhttp://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 SOAP Client Java, C++, C#, Delphi, VB Application SOAP Client Java, C++, C#, Delphi, VB Application SOAP over HTTP Web Server Apache / MS IIS Web Server Apache / MS IIS AS/SOAP Server (Tomcat with AXIS) AS/SOAP Server (Tomcat with AXIS) JSP/ Servlet JSP/ Servlet Web Service Web Service Object Common code base!

9 Ingeniørhøjskolen i Århus Slide 9 af 20 AXIS Project Provides us with a suitable framework Runs embedded in Apache Tomcat – just download –http://xml.apache.org/axis/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

10 Developing applications with AXIS

11 Ingeniørhøjskolen i Århus Slide 11 af 20 How to get started As opposed to Java RMI and CORBA, we do not necessarily have to start with the interface All we need is a Java class, and the toolkit will generate the WSDL interface for us We call this the JWS (Java Web Service) Instant Deployment scenario This approach has some limitations however, as we shall look into at a later point, but for now lets try this out

12 Ingeniørhøjskolen i Århus Slide 12 af 20 JWS Deploying the Calculator class Lets assume we have an existing class we want deployed as a Web service: All deployment that needs to be done is to rename the java source file, and copy it to the axis webapps root

13 Ingeniørhøjskolen i Århus Slide 13 af 20 And that’s it! And so – we have a Web service listening Potential clients my read the WSDL which is auto-generated by axis

14 Ingeniørhøjskolen i Århus Slide 14 af 20 Building the dynamic client First we must define the end-point Do we have all the Arguments from the user? Did the user choose To subtract or add?

15 Ingeniørhøjskolen i Århus Slide 15 af 20 Add the arguments & set the return type Building the dynamic client II Convert to integer Create a service and a call Set the end-point & the operation name invoke the web service Output the return value

16 Ingeniørhøjskolen i Århus Slide 16 af 20 Running the client Running this: Should result in this:

17 Ingeniørhøjskolen i Århus Slide 17 af 20 That was easy! Yes – but not beautiful Wont this become very complex with non trivial Web services? –Problem when parameters are non-atomic types –Handling of references? Where has the Access Transparency gone? What about Location Transparency?

18 Ingeniørhøjskolen i Århus Slide 18 af 20 Lessons to be learned We have actually made our own “client proxy stub” Can you make your own “client proxy stub” – so that the client application becomes “access transparent”? In fact, we shall look closer at the toolkits abilities next time and the more advanced features Also, the JWS Instant Deployment is only for simple class structures, it will not be as easy otherwise

19 The AXIS Project – How to Install

20 Ingeniørhøjskolen i Århus Slide 20 af 20 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.htmlhttp://jakarta.apache.org/tomcat/index.html Test installation is OK Then Install the AXIS Project –http://xml.apache.org/axis/http://xml.apache.org/axis/ I have prepared a brief installation help document to be found at the course web site


Download ppt "Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP."

Similar presentations


Ads by Google