Using SOAP with Enterprise JavaBeans
Because your server-side object doesn't rely on anything specific to SOAP, and because it can be just about any kind of Java class, there's no reason your server-side object can't use an EJB. In other words, you can use SOAP as a way to access an EJB remotely without using RMI-IIOP. Of course, you must write a layer to go between SOAP and EJB.
Listing 25.8 shows an example server-side object that accesses the Person bean from Chapter 12, "EJB Design."
Code Listing 25.8. Source Code for SoapPerson.java
package usingj2ee.addressbook; import java.util.*; import javax.naming.*; import javax.rmi.PortableRemoteObject; public class SoapPerson { public SoapPerson() { } public FullPersonViewer locatePerson(String ... |
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.