Developing a service endpoint interface from JavaBeans for JAX-RPC applications
You must develop a service endpoint interface if you are developing a JAX-RPC web service from a JavaBeans implementation.
Before you begin
About this task
This task is a required step in developing a JAX-RPC Web service from a Java bean.
The service endpoint interface defines the methods for particular Java API for XML-based RPC (JAX-RPC) web services. The JavaBeans implementation must implement methods with the same signature as the methods on the service endpoint interface. A number of restrictions apply on which types to use as parameters and results of service endpoint interface methods. These restrictions are documented in the JAX-RPC specification.
You can also create a service endpoint interface by using assembly tools.
Develop a service endpoint interface for a JavaBeans implementation by following the actions listed:Procedure
Results
Example
The following example depicts the AddressBook interface:
package addr;
public interface AddressBook {
/**
* Retrieve an entry from the AddressBook.
*
*@param name the name of the entry to look up.
*@return the AddressBook entry matching name or null if none.
*@throws java.rmi.RemoteException if communications failure.
*/
public addr.Address getAddressFromName(java.lang.String name);
}
Use the AddressBook interface
to create the service endpoint interface:
- Make a copy of the AddressBook.java interface and name it AddressBook_SEI.java. Use this copy as a template for the service endpoint interface.
- Compile the interface.