Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

What is the name of the services you have chosen? What do they do? What is the name of the publisher? Provide details if you are developing your own service(s).

There are various ways to develop these services. Should you wish to develop SOAP-based services, some easy steps to follow to write client-side code are provided in this document.

Question 1. How does your Web services development approach compare with the steps required to implement a Java RMI client? How does it differ from the example of a Web Services discussed in lectures and developed using JAX-RPC and JAX-WS?

At this stage, you are supposed to have both services running and invoked through appropriate interfaces.

4. The ?nal step is to implement a class that combines the two Web services and provides an appropriate userinterface for the collection of input data and presentation of results. There are two options here:

• Make the application console-based, with input data coming from the command line if required and results being written to a ?le as a static page of HTML.

• Implement the application as a servlet or using JSP, as appropriate. The HTML will be generated dynamically in this case. If you are following this option, you will need to package your application in the conventional way, as a WAR ?le.

Answer the following questions:

Question 2. Consider the respective platforms upon which the service providers and service consumer are implemented. What does this tell you about how Web Services differ from more conventional distributed object technology?

Question 3. What are the factors affecting the performance of your application? In what ways,and at what cost, could performance be improved? (You may assume that you have the freedom to reimplement the service providers as well as your service consumer, using a different hardware and
software platform if necessary.

Web service client-side development steps


The following explains the steps required to develop a SOAP-based client should you choose an existing service.

1. Before starting on any coding, if you have not set up Axis during the Lab. session on Web Services then make sure your environment is correctly setup.

2. Before implementing a class to encapsulate a chosen Web service, you should generate client-side stubs for the service from its WSDL document. This is done by running Axis’ WSDL2Java tool, via the shell script wsdl2java already provided for you. For example, if you have saved the WSDL to a ?le service.wsdl, then the following is required:

./wsdl2java service.wsdl


After running the script, you will see that a hierarchy of subdirectories has been created, re?ecting the package within which the stubs and helper classes reside (depending on the service you use you may need to move into a subdirectory before you ?nd the .java ?les). Have a look at these ?les and make that sure
you understand their purpose. (The documentation provided with Axis will prove useful here, particularly the section of the User Guide on WSDL2Java.)

3. Move back up into the top directory and compile the stubs with a command like

javac /path/to/java/files/
*
.java
Then package the stub classes as a single JAR ?le with a command something like this:
jar cvf stubs.jar /path/to/java/files/
*
.class

You will need to submit this JAR ?le with your source code. You should also make sure that it is in your CLASSPATH when you try to compile or run the consumer of your chosen Web Service.

4. To implement the consumer of a chosen Web Service, note the following points about implementation:

• There are three steps involved in making a method call to a service exposed via statically-generated
stubs:

(a) Create an instance of the ‘Locator’ class
(b) Get an instance of the ‘Soap’ class by calling appropriate method (e.g., get...Soap)
(c) Invoke the desired method of the ‘Soap’ object

For further details, see the Axis User Guide—especially the section covering WSDL2Java. The main method of this class can contain code to test the service.

5. The ?nal step is to implement a class that combines the two Web services and provides an appropriate user interface for the collection of input data and presentation of results.

Submission


• Use the document cwk3-answers-form available in the courseworks folder to report your written answers to the questions. Submit the document:

1. through the link cwk3 - Answers submission. Word and pdf ?le formats are acceptable (pdf is encouraged).

2. on paper in the normal way, via the CSO postbox. Remember to attach a completed coursework header
sheet.

• To submit your code for the exercise, create a Zip or tar archive of the ?les which make up your system and submit the ?le through the link cwk3 - Code submission. Remember to include a descriptive README ?le as well as any additional material.Be sure to include all ?les needed for your city server system to work as part of your submission. You may include .class ?les if you wish, but this is not necessary; we will be testing whether your code compiles when we mark it.

Be sure to include in your submission all the ?les that you have generated for your client. If you have organised your ?les into a directory hierarchy, then please package this as a single Zip or tar archive and submit that ?le through the link cwk3 - Code submission. If your application is packaged as a WAR ?le, please include this ?le in your submission.

Java, Programming

  • Category:- Java
  • Reference No.:- M9521899

Have any Question?


Related Questions in Java

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

  • 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