You are to develop a pair of web services complete with


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.

Solution Preview :

Prepared by a verified Expert
Application Programming: You are to develop a pair of web services complete with
Reference No:- TGS0642429

Now Priced at $40 (50% Discount)

Recommended (97%)

Rated (4.9/5)