import java.rmi.RemoteException; import javax.jws.WebMethod; import javax.jws.WebService; import org.beehive.demo.Address; import org.beehive.demo.AddressBook; import org.beehive.demo.AddressBookImpl; @WebService(targetNamespace = "http://www.beehive.com/AddressBook") public class AddressBookWebService implements AddressBook { AddressBook addressBook; public AddressBookWebService() { addressBook = new AddressBookImpl(); } /** * @param name * @param address * @throws java.rmi.RemoteException */ @WebMethod public void addEntry(String name, Address address) throws RemoteException { addressBook.addEntry(name, address); } /** * @param name * @return * @throws java.rmi.RemoteException */ @WebMethod public Address getAddressFromName(String name) throws RemoteException { return addressBook.getAddressFromName(name); } public void notWebService() { } }