This topic explains how to develop a service endpoint interface from an EJB.
Set up a Web services development and unmanaged client run-time environment.
This task is a required step in developing a 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, which is available through Web services: Resources for learning.
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 the assembly tools.
Develop a service endpoint interface by following the steps provided in this task section.
ResultYou have a service endpoint interface that you can use to develop a Web service.
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; }
Related tasks
Developing a Web service from an enterprise bean
Related reference
Artifacts used to develop Web services