Creating a service endpoint interface
This recipe explains how to create a service endpoint interface. A Service Endpoint Interface (SEI) is used in Java for exposing JavaBeans as web services, or more accurately, SEI defines the methods of Java code to be exposed as web services. The interface class must extend the java.rmi.Remote
interface and all methods of the interface must throw java.rmi.RemoteException
.
How to do it…
In our example application, the most appropriate part of the application to expose is the credit card operations module. It already contains all the relevant methods that we want to expose:
- We right-click on
CreditCardGateway.java
in JDeveloper. - Select Create Web Service…. The Create Web Service wizard opens at Step 2:
- Select Next, and on the next page, select Add SEI. Then, click on Finish.
- We have now generated a web service ready to be deployed.
How it works…
Let us first start by checking the new elements in the JDeveloper project as a result of web...