A1.1 Assignment 1 “Deploying a Simple Web Service” ITCS 4010/5010 Grid Computing, UNC-Charlotte B. Wilkinson, 2005.

Slides:



Advertisements
Similar presentations
Chapter 20 Recursion.
Advertisements

CS Network Programming CS 3331 Fall CS 3331 Outline Socket programming Remote method invocation (RMI)
1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
Copyright © 2003 Pearson Education, Inc. Slide 1.
Chapter 1 The Study of Body Function Image PowerPoint
19 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Developing Web Services.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
4 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: Servlets.
3 Copyright © 2005, Oracle. All rights reserved. Basic Java Syntax and Coding Conventions.
11 Copyright © 2005, Oracle. All rights reserved. Using Arrays and Collections.
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
7 Copyright © 2005, Oracle. All rights reserved. Creating Classes and Objects.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
10 Copyright © 2005, Oracle. All rights reserved. Reusing Code with Inheritance and Polymorphism.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
State of New Jersey Department of Health and Senior Services Patient Safety Reporting System Module 2 – New Event Entry.
1 Community Right to Know Electronic Reporting Bruce Boyd Tina Gutierrez & Latoshia Parker Office of Pollution Prevention and Right to Know.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
1 How to Enter Time. 2 Select: Log In Once logged in, Select: Employees.
Suite Suite 2 TPF Software – Overview Binary Editor Remote Scripts zTREX Add-Ins & Project Integration with Source Control Manager.
Page 1 of 30 To the Create Assignment Request Online Training Course An assignment request is created by an assignor to initiate the electronic assignment.
ABC Technology Project
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
VOORBLAD.
1 public class Newton { public static double sqrt(double c) { double epsilon = 1E-15; if (c < 0) return Double.NaN; double t = c; while (Math.abs(t - c/t)
©2007 First Wave Consulting, LLC A better way to do business. Period This is definitely NOT your father’s standard operating procedure.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Eclipse Web Tools Platform Project © 2005 IBM Corporation Developing Web Services with Eclipse – Programming Examples Arthur Ryman IBM Rational
CMPT 275 Software Engineering
© 2012 National Heart Foundation of Australia. Slide 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
25 seconds left…...
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Presentation 7 part 2: SOAP & WSDL.
Services Course Windows Live SkyDrive Participant Guide.
Januar MDMDFSSMDMDFSSS
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
How to Fill out a PAR for a New Standard Revised 8 July 2010.
PSSA Preparation.
Immunobiology: The Immune System in Health & Disease Sixth Edition
The PLASTIC Model to HUTN transformation tool UDA.
Abstract Class, Packages and interface from Chapter 9
1 Abstract Class and Packages from Chapter 9 Lecture.
Presentation 10 SOAP on the Microsoft Platform (.NET)
Grid Computing, Barry Wilkinson, 2004A3.1 Assignment 3 Simple Job Submission Using GRAM.
Mark Holliday and Barry Wilkinson, 2004A2.1 Assignment 2 “Simple” Grid Services Assignment.
Barry Wilkinson and Mark Holliday, 2004A1.1 Assignments Preliminaries Several computers are configured at WCU for the assignments. Here, terra.cs.wcu.edu.
A1.1 Assignment 1 “Deploying a Simple Web Service”
A3.1 Assignment 3 Simple Job Submission Using GT 4 GRAM.
3b.1 Web Services Part II Implementation details ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3b version 0.1.
AssignPrelim1.1 ITCS 4146/5146 Grid Computing, 2007, UNC-Charlotte, B. Wilkinson. Jan 13, 2007 Course Preliminaries.
AssignPrelim1.1 ITCS 4146/5146 Grid Computing, 2008, UNC-Charlotte, B. Wilkinson. Aug 25, 2008 Course Preliminaries.
Assignment 1 “Deploying a Simple Web Service” Mark Holliday Department of Mathematics and Computer Science Western Carolina University.
Web Services (tying it all together) and Introduction to Grid Services Concepts These slides are adapted from course material developed by Barry Wilkinson,
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
Working With Apache Axis. Axis Information See guide.html for the basic user guide.
How to Write a Grid Service  The grid service will do basic mathematical operations. The math grid service is going to have the following methods:  add:
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
Creating Web Services Presented by Ashraf Memon Presented by Ashraf Memon.
Assignment Preliminaries
Assignment Preliminaries
Presentation transcript:

A1.1 Assignment 1 “Deploying a Simple Web Service” ITCS 4010/5010 Grid Computing, UNC-Charlotte B. Wilkinson, 2005

A1.2 Acknowledgement This assignment is derived from: “Classroom Exercises for Grid Services” by A. Apon, J. Mache, Y. Yara, and K. Landrus, Proc. 5th Int. Conference on Linux Clusters: The HPC Revolution, May 2004.

A1.3 Task To build, deploy and test a simple web service.

A1.4 Tools This assignment uses: –Java 2 platform standard edition –Apache Jakarta Tomcat Java servlet container –Apache Axis tools

A1.5 Steps Write the Java code to implement the web service. Use Axis to generate all needed Java source files. Compile the source files just generated. Create client source and compile. Execute client to access service. Extend the functionality of the service.

A1.6 Client Web service Apache Tomcat hosting environment

A1.7 Step 1 – Implement Service Write the code for the class that provides the web service. This code is: public class MyMath { public int squared(int x) { return x * x; } Save that code as a.jws (Java Web Service) file, Math.jws.

A1.8 Step 1 (continued) Copy the.jws file to the axis directory: cp MyMath.jws \ $CATALINA_HOME/webapps/axis/yourusername %CATALINA is an environment variable specifying the path to the home directory of the Apache Tomcat java servlet container.

A1.9 Axis Java Web Service Facility By placing your Java code as a.jws file in your web application directory structure, Axis will automatically find it, compile it, and deploy the methods.

A1.10 Axis Java Web Service Facility (cont.) The service is now deployed and can be accessed remotely through it’s URL: :8080/axis/yourusername/… Example grid0.uncc.edu:8080/axis/abw/MyMath.jws

A1.11 However, a client cannot access the service without all the code needed handle the SOAP messages, i.e. the stubs and associated files.

A1.12 Can use Java service code as the basis to create the WSDL file using an Axis “Java2WSDL” tool. Then use the WSDL as the basis to create the requires Java files using an Axis “WSDL2Java” tool

A1.13 Step 2 Generate files Use the Axis tools to create four Java source files from MyMath.jws with the composite command: java -classpath $AXISCLASSPATH \ org.apache.axis.wsdl.WSDL2Java \

A1.14 Step 2 (continued) Axis finds MyMath.jws file and creates Two source files each holding a Java interface, – MyMath.java and – MyMathService.java Two source files each holding a Java class, – MyMathServiceLocator.java – MyMathSoapBindingStub.java These files are put in a new package in localhost/axis/yourusername/MyMath_jws/ which is in /home/yourusername/WebServices/

A1.15 MyMath.java -- Client code MyMathService.java -- Service code

A1.16 MyMathServiceLocator.java -- Java class used by client to find location of service. MyMathSoapBindingStub.java -- Java class that converts client service call to form to be sent to service. – client stub.

A1.17 Other files deploy.wsdd – WSDD file provided to registry when service deployed. undeploy.wsdd -- for undeploying service

A1.18 Files used by service Service stub (skeleton): MyMathSoapBindingSkeleton.java MyMathSoapBindingImpl.java – used by MyMathSoapBinding Skeleton.java

A1.19 Structure Client Stub Registry (Locator) StubService Method call/return Request WSDL WSDL MyMathSoapBindingSkeleton.java MyMathSoapBindingStub.java MyMath.java MyMathService.java WSDD deploy.wsdd undeploy.wsdd MyMath.wsdl MyMathClient.java MyMathServiceLocator.java Deploy

A1.20 Step 3 Compile new source files Compile source files generated by step 2 with: javac -classpath $AXISCLASSPATH \ localhost/axis/yourusername/MyMath_jws/*.java

A1.21 Step 4: Write Client Source Below is client code for an earlier version of Axis (1.1). Version 1.2 used in the assignment requires more code. import localhost.axis.yourusername.MyMath_jws.MyMathServiceLocator; import localhost.axis.yourusername.MyMath_jws.MyMathService; import localhost.axis.yourusername.MyMath_jws.MyMath; public class MyMathClient { public static void main(String args[]) throws Exception { MyMathService service = new MyMathServiceLocator(); MyMath myMath = service.getMyMath(); int x = (new Integer(args[0])).intValue(); System.out.println("The square of " + args[0] + " is " + myMath.squared(x)); }

A1.22 Step 5 Compile Client code Compile the client source file with: javac -classpath $AXISCLASSPATH:. MyMathClient.java

A1.23 Step 6 Execute Web Service program java -classpath $AXISCLASSPATH MyMathClient 4 The square of 4 is 16

A1.24 Step 7 Extend the Web Service Add functionality to the MyMath web service: Add a method that identifies whether a number is even. Add a method that identifies whether a number is prime. Modify MyMath.jws file and repeat all previous steps to test the extended web service.

A1.25 Optional/Extra credit For extra credit, create a second web service (say to do a different math operation) and demonstrate a client using two web services. This may not be trivial!

A1.26 Submission of Assignment 1 Produce a 4-6 page Word document. Includes how you modified the service (code and explanation). Show that you successfully followed the instructions and performs all tasks by taking screen shots and include these screen shots in the document. Number of screen shots is up to you but it should demonstrate your programs worked. The less documentation provided, the fewer partial credit can be given.

A1.27 Screenshots To include screen shots from Windows XP, select window, press Alt- Printscreen, and paste to file. Using Suse Linux, can find a screen shot tool at: Start->Utilities->Desktop->KSnapshot.

A1.28 Submission continued Submit your document via WebCT PLEASE DO NOT SUBMIT BY TO ME!!

A1.29 Due Date (Tentative) 11:59 pm Thursday September 8th, 2005 unless you have system problems outside your control. Assignment will not be accepted after the due date unless you can document a valid reason.

A1.30 You MUST report any system problems that are preventing you complete an assignment at least 48 hours before the due date so that you can be given an account elsewhere if necessary. No extensions will be allowed if you did not contact us 48 hours before the due date. System Problems