Developing a service endpoint interface from enterprise beans for JAX-RPC applications
You can develop a service endpoint interface from an Enterprise JavaBeans (EJB) for JAX-RPC web services.
Before you begin
Set up a development environment for web services. To learn more, see the setting up a development environment for web services information.
Set up a development environment for web services.This task is a required step in developing a Java™ API for XML-based RPC (JAX-RPC) web service from an enterprise bean.
The service endpoint interface defines the web services methods. The enterprise beans that implements the web service must implement methods having the same signature as the methods of the service endpoint interface. A number of restrictions exist on which types to use as parameters and results of service endpoint interface methods. These restrictions are documented in the Java API for XML-based remote procedure call (JAX-RPC) specification. See the web services specifications and API documentation to review the JAX-RPC specification along with a complete list of the supported standards and specifications.
The easiest method for creating the service endpoint interface for an EJB web service implementation is from the EJB remote interface.
You can also create a service endpoint interface by using assembly tools..
About this task
Procedure
Results
Example
package addr;
public interface AddressBook_RI extends javax.ejb.EJBObject {
/**
* 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)
throws java.rmi.RemoteException;
}
Use the following steps to create the service endpoint
interface with the AddressBook_RI remote interface:- Locate a remote interface that has already been created, like the AddressBook_RI.java remote interface.
- Make a copy of the AddressBook.java remote interface and use it as a template for the service endpoint interface.
- Compile the AddressBook.java service endpoint interface.