T110 5140 Network Application Frameworks and XM Assignments

  • Slides: 40
Download presentation
T-110. 5140 Network Application Frameworks and XM Assignments

T-110. 5140 Network Application Frameworks and XM Assignments

Contents n n n Introduction Laboratory environment Assignments u requirements, background, steps Grading and

Contents n n n Introduction Laboratory environment Assignments u requirements, background, steps Grading and deadlines Contact information and office hours Assignment groups

Introduction n n Two assignments need to be completed during this course Each assignment

Introduction n n Two assignments need to be completed during this course Each assignment is done as pair work (you can also do them alone) Today we look at the assignments in detail This information will also be available on the course homepage u Also more information on using the lab computers

Assignments n n n CORBA SOAP XML-Schema

Assignments n n n CORBA SOAP XML-Schema

Environment n n n Linux Open. Swan IPSec support JDK Java ORB & IIOP,

Environment n n n Linux Open. Swan IPSec support JDK Java ORB & IIOP, Apache Axis, Xerces Machines may be used in the lab (A 120) You can also use SSH to use the computers remotely u Tentative

CORBA Assignment n n Implementation of a simple web client and server using CORBA

CORBA Assignment n n Implementation of a simple web client and server using CORBA and IIOP CORBA remote operations are used to download a file from a server machine. Use of IPSEC on top of IP to secure the connection Optional bonus: Keynote 2 trust management system certificates

CORBA II n The goals of this assignment are u To learn about using

CORBA II n The goals of this assignment are u To learn about using ORB, IIOP and IDL. u To familiarize with the IPSec architecture on IPv 4/IPv 6. u To study CORBA security using Key. Note 2 and IPSec.

CORBA III n n The assignment is done using JDK and Java ORB and

CORBA III n n The assignment is done using JDK and Java ORB and IIOP IPSec security using Linux and Open. Swan u Installed on lab computers

Details n n n Write the web server and client. Use the idlj IDL

Details n n n Write the web server and client. Use the idlj IDL compiler that comes with Java 2. Record network interaction between the client and server with tcpdump (see 'man tcpdump') when you retrieve a file. Create IPSec Security Associations Record network interaction (protected with Encapsulated Security Payload, ESP) between the client and server with tcpdump. Compare with the other dump. Optional bonus: modify the IPSec setup to use Key. Note 2 certificates or explain in detail how this could be done.

Return n You need to return: u Java code for the server and the

Return n You need to return: u Java code for the server and the client u Compiled classes u Dump of protected / unprotected communication (tcpdump) u Optional bonus: details how to setup Keynote 2 certificates

// IDL schema definition for Web server interface Web_Server { typedef sequence<octet> Content_Type; struct

// IDL schema definition for Web server interface Web_Server { typedef sequence<octet> Content_Type; struct Metadata_Type { // Status of the <get> operation. These // values should map onto the normal HTTP // status values, e. g. , 200 means success, 404 // means "file not found, " etc. short status_; // Modification date. string modification_date_; // Type of content. string content_type_; }; // Download the <contents> associated with <pathname>. // The <metadata> reports information about the <contents>. void get (in string pathname, out Content_Type contents, out Metadata_Type metadata); };

IPSec Configuration n n /etc/ipsec. conf u create a Security Association between the two

IPSec Configuration n n /etc/ipsec. conf u create a Security Association between the two machines Transport-mode or tunnel-mode (ESP, Encapsulated Security Payload), symmetric keys Use manual keying There are examples on the web page how to use ipsec with sudo

Background material n CORBA and Java u n http: //java. sun. com/j 2 se/1.

Background material n CORBA and Java u n http: //java. sun. com/j 2 se/1. 3/docs/guide/corba/ index. html IETF IPSec Working Group Charter u http: //www. ietf. org/html. charters/ipsec- charter. html n Open. Swan u n http: //www. openswan. org/ Keynote u http: //www. cis. upenn. edu/~angelos/keynote. h tml

Questions about the CORBA Assignment?

Questions about the CORBA Assignment?

SOAP n n SOAP (formerly called Simple Object Access Protocol) is an XML-based lightweight

SOAP n n SOAP (formerly called Simple Object Access Protocol) is an XML-based lightweight protocol for exchanging information in a distributed environment. SOAP consists of three parts: u an envelope for describing what is in a message and how the message is processed, ua set of encoding rules for custom datatypes, and a convention for representing Remote Procedure Calls (RPC). u. A binding with HTTP

SOAP II n n In this assignment you need to deploy your own simple

SOAP II n n In this assignment you need to deploy your own simple web service that provides text search service for clients using Apache Axis is a Java SOAP engine that includes a stand-alone server, support for WSDL, tools for generating Java classes from WSDL descriptions, and sample programs.

Requirements n n n The service has a simple index consisting of filenames and

Requirements n n n The service has a simple index consisting of filenames and a number of keywords for each filename. The keywords are matched against the search word given by the user. The service receives three input parameters: the number of matching documents that are returned, the search word, and a parameter indicating whether or not the search is fuzzy (partial matching or exact matching).

Requirements II n n n The search service returns the filenames that have matching

Requirements II n n n The search service returns the filenames that have matching keywords in the service datafile. The datafile contains filenames and each filename may have several keywords. The filenames are returned either as a string separated by whitespaces or as a vector of strings. You will also need to implement a SOAP client for the service that can be used to make command-line queries. The client prints the results to the screen.

Goals n The goals of this assignment are defined as follows: · To familiarize

Goals n The goals of this assignment are defined as follows: · To familiarize with SOAP and Web Services. · To understand concepts such as XML-based RPC, WSDL, deployment of web services. · To make SOAP invocations, process responses and define service interfaces. · To create a simple Java web service and a SOAP client

Details u Read and get to know the SOAP specification and Apache Axis SOAP

Details u Read and get to know the SOAP specification and Apache Axis SOAP API. u Download Apache Axis and perform the installation (set the classpath. . ). u Design and implement the service. You can start from a WSDL description or by writing the service Java interfaces and code. u Create a simple command-line SOAP application to access the search service. u Deploy the service, and test your client program.

Return n Return: · The code for the search service · The code for

Return n Return: · The code for the search service · The code for the client program · Compiled classes · A sample output of the client accessing the service · Tcpdump or tcp-monitor (Axis tool) output of the traffic · · if you do also the IPSec assignment, please compare the dumps WSDL and WSDD descriptions of your service. WSDL can be machine generated.

Axis Installation n Download and unzip Apache Axis Set up your CLASSPATH to contain

Axis Installation n Download and unzip Apache Axis Set up your CLASSPATH to contain all the JAR files in /xml-axis-10/lib and the xml-axis-10 directory. Note that you need to have an XML parser available. You can use xerces. Impl. jar and xml. Parser. APIs. jar from Xerces 2. Start a simple Axis HTTP server on port 20000 (in a separate window) by typing: u java org. apache. axis. transport. http. Simple. Axis. Server p 20000

Axis Installation II n Move to the /xml-axis-10/samples/echo directory and deploy the service: u

Axis Installation II n Move to the /xml-axis-10/samples/echo directory and deploy the service: u n n n java org. apache. axis. client. Admin. Client -p 20000 deploy. wsdd Run the client program: u java samples. echo. Test. Client -p 20000 The sample program should produce echo test results. You can download the machine generated WSDL description by issuing the following URL to a browser: u http: //localhost: 20000/axis/services/echo? WSDL

Background material n TCPMonitor is a useful tool for monitoring SOAP requests u u

Background material n TCPMonitor is a useful tool for monitoring SOAP requests u u n SOAP u n http: //www. w 3. org/TR/SOAP/ AXIS u n Included with Axis java org. apache. axis. utils. tcpmon [listen. Port target. Host target. Port] http: //xml. apache. org/axis/ Web Services Description Language (WSDL) 1. 1 u http: //www. w 3. org/TR/wsdl

Questions about the SOAP assignment?

Questions about the SOAP assignment?

XML Schema Assignment n n The XML Schema specifications from W 3 C define

XML Schema Assignment n n The XML Schema specifications from W 3 C define an XML language for describing the syntax and structure of XML documents. Schemas can be used to define what, where and how XML elements can be used. It allows the description of complex data types and restrictions on existing types.

XML Schema Assignment II n n n In this assignment you need to create

XML Schema Assignment II n n n In this assignment you need to create an XML schema for a catalog or a library that allows the description of items in the catalog. The schema contains an item type for basic items in the catalog. This basic item type is extended in order to create custom item types. Create at least one custom type in your schema.

Requirements n You need to use the following XML Schema features: F Elements n

Requirements n You need to use the following XML Schema features: F Elements n n and attributes · Extension of complex types. · References (ref). · Constraints (cardinality constraints). · Namespaces and multiple schemas (import). · Bonus points: groups, keyref, unique You need to create an XML instance of this schema that demonstrates the features of the schema. You also need to validate the XML instance against the schema using Xerces from the Apache Group.

Example n n n isbn-number (complex type with restrictions on format), book (basic type),

Example n n n isbn-number (complex type with restrictions on format), book (basic type), dictionary (custom type with enhanced features) u extends basic book-schema

Goals n The goals of this assignment are defined as follows: · To familiarize

Goals n The goals of this assignment are defined as follows: · To familiarize with XML Schema. · To understand concepts such as elements, complex types, namespaces, extension. · To create XML schemas and use resources from different schemas.

Details u Read and get to know the Schema specification u Download Xerces for

Details u Read and get to know the Schema specification u Download Xerces for Java and perform the installation. u Design and create your schema and an XML file that is an example of the schema and demonstrates the features of the schema. u Compile a simple test Java program to validate th XML file against the schema. u Run the validation program.

Return n Return: · The XML Schema and the XML instance document · The

Return n Return: · The XML Schema and the XML instance document · The code for the validator · Compiled classes · A sample output of the validation program indicating that the validation succeeded. · Additional bonus: compare XML Schemas with DTDs or some other schema specification

Backround material n n n http: //www. w 3. org/XML/Schema http: //www. w 3.

Backround material n n n http: //www. w 3. org/XML/Schema http: //www. w 3. org/TR/xmlschema-0/ http: //www. w 3. org/TR/xmlschema-1/ http: //www. w 3. org/TR/xmlschema-2/ http: //www. xml. com/

Questions about the XML Schema assignment?

Questions about the XML Schema assignment?

Grading n Each assignment will be graded with 0, 1, 3 or 5 points

Grading n Each assignment will be graded with 0, 1, 3 or 5 points according to the following principle: · 0 p: if you do not meet the minimum requirements of the exercise · 1 p: if the requirements are met, but the assignment does not work properly. · 3 p: if the requirements are met and the assignment is properly done. · 5 p: if the requirements are met, the bonus part is done, and the assignment is very well done.

Grading II n n You must pass both assignments, that is, 0 p in

Grading II n n You must pass both assignments, that is, 0 p in the other assignment means that you will fail, even if the other assignment was graded with 5 p. The grade for the assignments will be formed in the following way: · 2 points equals grade 1 · 4 points equals grade 2 · 6 points equals grade 3 · 8 points equals grade 4 · 10 points equals grade 5

Deadlines n n Deadline for first assignment 23. 3. Deadline for second assignment 15.

Deadlines n n Deadline for first assignment 23. 3. Deadline for second assignment 15. 5 Grading within approximately 2 weeks of the submission Submissions in any order

Contact Information n n Send mail to our course address u T-110. 5140@tml. hut.

Contact Information n n Send mail to our course address u T-110. 5140@tml. hut. fi Or post a message to the newsgroup: u opinnot. tik. naf Mail about the course u sasu. tarkoma@hiit. fi Office hours for consultation: u To be announced.

Groups n n n Assignments are done as pair work Each group gets an

Groups n n n Assignments are done as pair work Each group gets an account and password to the laboratory Send an email that contains the names of the group members

Questions?

Questions?