Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Please I want you make sure to assign my order to the best programmer you have, not to beginner one as I do not have lots of time. Also, please make sure you follow my structures and do it excellent.

The assignment use tomcat and axis to do it. Using java language.

Important Please follow the example to do it. Therefore, please do it on time and do it excellent, by following the instructors bellow.

You should work through the example given for Java Web Services and SOAP. It leads you through setting up a Tomcat server to deploy web services and shows you how to use the AXIS tools to generate a WSDL and stub code for the clients. It also shows you how to set up your environment to work correctly with Tomcat, AXIS.

The example as the following:

1-For the following examples, the ‘client' can be any Java process. The ‘server' requires a
Java web application server - we will use Tomcat.

2-Downloads required
• Tomcat: http://apache.mirror.aussiehq.net.au/tomcat/tomcat-7/v7.0.20/bin/apache-tomcat-7.0.20.zip

• AXIS: http://apache.mirror.aussiehq.net.au/ws/axis/1_4/axis-bin-1_4.zip

3-Setting up the server

- Extract the apache-tomcat-7.0.20.zip ZIP file to u:\
- This will give you a u:\apache-tomcat-7.0.20 folder.

Rename it to u:\tomcat

- Extract the axis-bin-1_4.zip to u:\
- This will give you a u:\axis-1_4. Rename it to u:\axis
- Copy the u:\axis\webapps\axis\ folder to the u:\tomcat\webapps folder

Open up a Command Prompt and run
• u:\tomcat\bin\startup.bat

Browse to http://localhost:8080/axis/
- Select the ‘validation' option and ensure that all the required components are found
- Your application server is now ready to accept deployment of SOAP services

Now to write the server-side object defining the methods you wish to expose via the SOAP Service

• The service-side object is just a standard Java class

public class HelloWorld
{
public String sayHello()
{
return "Hello World";
}
}

Compile the class to ensure there are no errors

• We will be using the ‘Java Web Service' to deploy our new web service so the class file actually is not needed.

Copy your HelloWorld.java file to u:\tomcat\webapps\axis\HelloWorld.jws

• Navigate to http://localhost:8080/axis/HelloWorld.jws
• Done !

Java Web Services provides a quick, easy way to deploy small web services
• More complex services can be deployed using the command line deployment tools provided by AXIS
• Manual deployment requires you to write a ‘Deployment Descriptor.

Navigate to
- http://localhost:8080/axis/HelloWorld.jws?wsdl
• This is the interface definition for our web service.
You would distribute this file to people wishing to use your web service.
• The WSDL not only defines the interface, but also declares the network address of your server.

Download the WSDL file
• First we must create a ‘skeleton' that our client can talk to
• AXIS provides a ‘WSDL2Java' tool to do this

Create a new folder for your source code, outside of the
Tomcat directory structure, called u:\soap_client\
- Copy the WSDL file into this folder and call it mywsdl.xml
- Copy u:\axis\lib\log4j.properties into u:\soap_client\
- Add the following entries to your classpath environment variable

• u:\axis\lib\axis.jar;u:\axis\lib\commonsdiscovery-0.2.jar;u:\axis\lib\commons-logging-1.0.4.jar;u:\axis\lib\jaxrpc.jar;u:\axis\lib\log4j-1.2.8.jar;u:\axis\lib\saaj.jar;u:\axis\lib\wsdl4j-1.5.1.jar
- Change to your u:\soap_client folder and run java org.apache.axis.wsdl.WSDL2Java mywsdl.xml
- This will generate a folder called localhost containing stub code


Compile the stub code
• cd localhost\axis\HelloWorld_jws\
• javac *.java
- Create a new Java file in u:\soap_client called HelloWorldClient.java
- Now write your client code

import localhost.axis.HelloWorld_jws.*;
public class HelloWorldClient
{
public static void main(String[] args)
{
try
{
HelloWorldService hws = new HelloWorldServiceLocator();
HelloWorld hw = hws.getHelloWorld();
System.out.println(hw.sayHello());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}

Compile and run your client (you can ignore the attachment support warnings)
$ set CLASSPATH=.;%CLASSPATH%
$ javac HelloWorldClient.java
$ java HelloWorldClient
Hello World

Assignment Task

You are to develop a pair of Web Services, complete with matching WSDLs and client software, which implement the functions of a Local Time Converter (LTC) service. A Local Time Converter service allows users to provide the Local Time (e.g. 13:30) at one location (e.g. SYDNEY) and be provided the time at another (e.g. AMSTERDAM - in which case the time would be 05:30). It is usual for such services to keep information relating the difference (e.g. SYDNEY is +10, AMSTERDAM is +2) at each time location relative to the time at Greenwich (which is called Greenwich Mean Time or GMT
(or UTC)).

The first Web Service (called MyLTCServer) presents an API for the service's users. This API allows the following unauthenticated functions:

#Retrieve the time offset (relative to GMT) for a specific location (double currentOffset(String location)) Returns a double representing the time offset relative to GMT for the provided location.
#Retrieve a list of currently supported locations (String listLocations()) Returns a String containing each of the currently supported locations, separated by "\n".

#Convert a time in one location to the time in another (String convert(String from, String to, String time)) Returns a String representing what time it is in the location to when it is time in the location from. The String representing time, and the return String, will be in the format HH:MM (with leading zero on the HH if necessary).

The second Web Service (called MyLTCAdmin) presents an API for the service administrator. This API allows the following authenticated functions:

#Add a new location to the system with its current time offset relative to GMT (boolean addLocation(String user, String pwd,
String location, double offset)) Returns false if the location already existed or the user credentials are invalid, true if the new location has been added.
#Update the time offset for a specific location (for example when Daylight Saving Time commences or ceases for the location)
(boolean setOffset(String user, String pwd, String location, double offset)) Returns false if the location does not exist or the user credentials are invalid, true if the location exists and has been updated.
#Retrieve the number of client web service calls performed on either interface since the server started (int callCount(String user, String pwd)) Returns -1 if the user credentials are invalid, otherwise returns the total number of calls (including this one) on either of the server interfaces.

Note that, as reflected above, the administrator web service requires a username (user) and password (pwd) to be passed with each web service call. The server should validate this username and password before performing any requests. You should hard-code an administrator username of ‘admin' and a matching password of ‘converter'.

To match these two web services, you will generate matching WSDL files and implement two sample command-line based clients - one for the standard user (MyUserClient) and one for the administrator (MyUserAdmin).

The command-line clients will allow each of the above-listed functions to be performed, passing in the required parameters from the command line. For example, you may implement the "Retrieve the current time offset for a specific location" function call by executing the command:

java MyUserClient currentOffset SYDNEY

The server's starting set of time offsets may be hard-coded as follows:
Offset relative to Greenwich = +10 (SYDNEY)
= +2 (AMSTERDAM)
= -7 (LOS ANGELES)
= +8 (BEIJING)

The server stores the list of supported locations, their corresponding time offsets relative to GMT, and the number of user web service calls performed in memory. It does not need to render them persistent by storing them to disk.

You should provide all your .java files and the WSDL files. Also provide a readme.txt file containing any instructions. Also, the code must be well commented each line and each method and each variables .Each program file should have a proper header and commented.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9883061
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Programming Language

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As