Define how to develop a pair of web services

Assignment Help Web Project
Reference no: EM13303737

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: https://apache.mirror.aussiehq.net.au/tomcat/tomcat-7/v7.0.20/bin/apache-tomcat-7.0.20.zip

• AXIS: https://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 https://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 https://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
- https://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.

Reference no: EM13303737

Questions Cloud

Determine the need to develop the wbs : Determine the need to develop the WBS before defining the activities in every instance. In the given scenario, think of the different types of dependencies within the project. In your opinion, how do the activity dependencies impact the project durat..
Find the amplitude and frequency of the elctric field : The magnetic field in a microwave traveling through vacuum has amplitude 4.00 X 10^-11T, Find the amplitude and frequency of the elctric field
Aggregate planning for a bottling company : Aggregate Planning for a Bottling Company
Obtain the work done by the air : Air that occupies 0.19 cubic meters at 1.03e+05 Pa gauge pressure is expanded isothermally to atmospheric pressure, Compute the work done by the air
Define how to develop a pair of web services : 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) ..
What will be her capital gain from holding the bond : If market conditions do not change--that is market interest rates remain constant--and Stephanie sells the bond in 12 months, what will be her capital gain from holding the bond?
Evaluate two alternatives in terms of the effect on price : Evaluate the two alternatives in terms of the effect on the price per share of the stock and shareholder wealth.
Find the wavelength as measure by an earth observer : A star is moving away from Earth at a speed of 2.4 X 10^8 m/s. find the wavelength as measure by an Earth observer
What is the intensity of the incident light : Unpolarized light is incident on a system of three polarizers. The second polarizer is oriented at an angle of 30 degrees with repect to the first, what is the intensity of the incident light

Reviews

Write a Review

 

Web Project Questions & Answers

  Question about forensic investigation

Prepaid cell phones make forensic investigation much hard. Explain how can you speedily investigate and collect digital evidence for a crime what involves a phone call.

  Systems analysis

Assume are a project manager of a small startup corporation assigned to a project to a build a dynamic web application to market to customers to more easily/cheaply download copyrighted videos and movies.

  Web accessibility test from browsers

Discuss web accessibility test from different web browsers. We have a caveat on the following QA-FOCUS suggestions. What will be our opinion on this?

  Time taken to get website page with embedded images

Assume you click on a link within your browser to get a Web page. The IP address for the associated URL is not cached in your local host, so a DNS look up is required to obtain the IP address.

  Create an html form and a corresponding java servlet

Construct an HTML form and a corresponding Java servlet that receives one or many parameters from the form and displays the result in a servlet generated dynamic page.

  Create a one-page professional-looking personal website

Create a one-page professional-looking personal website using only HTML and CSS. You may build your site on any topic of your choosing.

  Creating html frames in dreamweaver

Required help me with frames. I am using dreamweaver, and have been trying to create frames. However, I noticed that what happens is say create a web page called index.html with frames in it.

  Analyzing factors before change in technology

Determine some factors management should examine prior to approving a change in its company's technology?

  Explanation of contextual links

The most powerful hypertext capabilities is the the contextual link. Wikipedia . com is a great example of a site that utilizes contextual links.

  It consultant to a new nonprofit organization

Act as an IT consultant to a new nonprofit company, Free Flu, which gives flu shots to the elderly. The organization requires a domain name.

  Discuss the apache web server

Discuss the Apache Web server in regard to cost, functionality, and compatibility. Are there certain implementations were it may not be suitable?

  Traditional approaches for training professionals

Webinars and other web conferencing techniques have proved most beneficial for the provision of affordable quality corporate training.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd