Define a Java interface for the Election service suitable for use as a web service. State why you think the interface you defined is suitable. Explain how a WSDL document for the service is generated and how it is made available to clients.
What will be an ideal response?
The interface to the service is defined as a Java class. We need to define a class for the result e.g.
```
class Result {
String name;
int votes;
}
The interface is:
import java.rmi.*;
public interface Election extends Remote{
void vote(String name, int number) throws RemoteException; Result result () throws RemoteException;
};
```
This is suitable because it does not pass values of Remote as arguments or results.
The tool wscompile is used to generate a WSDL document describing the service from the above interface. When the service is deployed, this document is installed in the servlet container from whence clients may get it.
You might also like to view...
Given the accompanying figure, because the ID data type is built into the XML Schema, all elements and attributes from the XML Schema vocabulary must be identified using the xs namespace prefix.
Answer the following statement true (T) or false (F)
Operating systems that have windows and icons have what type of user interface?
a. command-driven b. graphical user c. menu-driven d. magnetic tape–based
With the Free Transform tool, the ____ handles are squares.
A. tangent B. anchor C. transformation D. action
The active worksheet tab displays in bold
Indicate whether the statement is true or false