Expand the contents of the Web Content WEB-INF node, and then delete

Example: Upgrading and Redeploying SOA Order Booking A-25 Remove throws RemoteException from the finsCustomerById method. ■ clientCustomerServiceClient.java and businessCustomerServiceClient.java a. Locate the section of the class file shown in Example A–1 and modify it so it reflects the changes shown in Example A–2 . b. Change the lookup to the following: CustomerService customerService = CustomerServicecontext.lookup CustomerServiceorg.soademo.customerservice.business.CustomerService; ■ businessCustomerserviceBean.java : Modify this file so its contents reflects the changes shown in Example A–3 . Example A–1 Original CustomerService.java File private static Context getInitialContext throws NamingException { Hashtable en = new Hashtable; Standalone OC4J connection details env.put Context.INITIAL_CONTEXT_FACTORY, oracle.j2ee.rmi.RMIInitialContextFactory ; env.put Context.SECURITY_PRINCIPAL, oc4jadmin ; env.put Context.SECURITY_CREDENTIALS, welcome1 ; env.putContext.PROVIDER_URL, ormi:localhost:23791CustomerService; return new InitialContext env ; Example A–2 Modified CustomerService.java File private static Context getInitialContext throws NamingException { Hashtable env = new Hashtable; env.put Context.INITIAL_CONTEXT_FACTORY, weblogic.jndi.WLInitialContextFactory ; env.put Context.SECURITY_PRINCIPAL, weblogic ; env.put Context.SECURITY_CREDENTIALS, weblogic ; env.putContext.PROVIDER_URL, t3:edith:7101; return new InitialContext env ; } Example A–3 Updated CustomerServiceBean.java Class File package org.soademo.customerservice.business; import javax.ejb.Remote; import javax.ejb.RemoteHome; import javax.ejb.Stateless; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.soademo.customerservice.persistence.Customer; Remote WebServiceserviceName = CustomerSvc, targetNamespace = http:www.globalcompany.comnscustomer Statelessname=CustomerService, mappedName = CustomerService public class CustomerServiceBean implements CustomerServiceLocal, CustomerService { PersistenceContextunitName = customerServiceUnit A-26 Oracle Fusion Middleware Upgrade Guide for Oracle SOA Suite, WebCenter, and ADF private EntityManager em; public CustomerServiceBean { } param entity return public Object mergeEntityObject entity { return em.mergeentity; } public Object persistEntityObject entity { em.persistentity; return entity; } public Object refreshEntityObject entity { em.refreshentity; return entity; } public void removeEntityObject entity { em.removeem.mergeentity; } codeselect objectcust from Customer cust where cust.custid = :custidcode WebMethod public Customer findCustomerByIdWebParamname = custid, targetNamespace = http:www.globalcompany.comnscustomer String custid{ public Customer findCustomerByIdString custid { return Customerem.createNamedQueryCustomer.findCustomerById.setParametercustid, custid.getSingleResult; } public String getCustomerStatusString CustomerID { WebMethod public String getCustomerStatusWebParamname = CustomerID, targetNamespace = http:www.globalcompany.comnscustomer String CustomerID{return findCustomerByIdCustomerID.getStatus; } public String addNewCustomerCustomer customer { WebMethod public String addNewCustomerWebParamname = customer, targetNamespace =http:www.globalcompany.comnscustomer Customer customer{ em.persistcustomer; making the change to return the customer id that client application can use to query orders return customer.getCustid; return New customer added sucessfully to customer database; } public Customer findCustomerByEmailString email, String password { WebMethod public Customer findCustomerByEmailWebParamname = email, targetNamespace = http:www.globalcompany.comnscustomer String email, WebParamname = password, targetNamespace = http:www.globalcompany.comnscustomer String password{ returnCustomerem.createNamedQuery Customer.findCustomerByEmail.setParameteremail, email.setParameterpassword,