In the Directory for Outgoing Files physical path field, enter the path to the Click Next and follow the rest of the adapter configuration instructions.

A-22 Oracle Fusion Middleware Upgrade Guide for Oracle SOA Suite, WebCenter, and ADF A.8.6.1 Upgrade the RapidService Web Service from OC4J JAX-RPC to Oracle WebLogic Server JAX-WS Before you can compile and deploy this project, you must upgrade the OC4J JAX-RPC Web services to Oracle WebLogic Server JAX-WS. The following procedure uses the top-down approach to regenerate the Web service using the existing WSDL: 1. Remove the existing JAX-RPC Web service files from the RapidService project: a. In Oracle JDeveloper 11g application navigator pane, open the RapidService project and expand following node: Application Sources org.soademo.rapidservice b. Right-click the RapidService node and select Delete from the context menu. c. In the Delete Web Service? dialog box, click Select All to select all the files shown in the dialog box. d. Clear the check box for the RapidService.wsdl file, as shown in Figure A–9 .

e. Click OK.

Figure A–9 Deleting the RapidService Web Service

f. Expand the contents of the Types node and delete Item.java, Quote.java.

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

oracle-webservices.xml, web.xml, and webservices.xml. Figure A–10 shows the files under RapidService that you must select and then delete. Example: Upgrading and Redeploying SOA Order Booking A-23 Figure A–10 Removing the RapidService Web Services Files and Related Files 2. Remove JAX-RPC Web Services from the classpath:

a. Right-click the RapidService project and select Project Properties from the

context menu. Oracle JDeveloper displays the Project Properties window.

b. Select Libraries and Classpath, select JAX-RPC 10.1.3 Web Services, click

Remove , and the click OK. 3. Generate the new JAX-WS Web service: a. Right click the RapidService.wsdl file under the following location in the RapidService project: Application Sources org.soademo.rapidservice RapidService b. Select Create Web Service from the context menu. Oracle JDeveloper displays the Create Java Web Service From WSDL wizard. c. Follow the instructions on the screen to create the new JAX-WS Web service: Be sure to select Java EE 1.5, with support for JAX-WS Annotations on the Select Deployment Platform screen. 4. Modify the poItemsQuote method in the RequestQuoteImpl.java file as follows: public Quote poItemsQuoteWebParamname = param0, targetNamespace = http:rapidservice.soademo.orgtypes ListItem param0 { Long totalPrice = new Long0; for int i = 0; i param0.size; i++ { Item localItem = param0.geti; totalPrice += localItem.getQuantity 110; } Quote priceQuote = new Quote; priceQuote.setSupplierNameRapidDistributors; priceQuote.setSupplierPricetotalPrice.toString; A-24 Oracle Fusion Middleware Upgrade Guide for Oracle SOA Suite, WebCenter, and ADF return priceQuote; } 5. Modify the orderQuote method in the RequestQuoteImpl.java file, as follows: public Quote orderQuoteWebParamname = param0, targetNamespace = http:rapidservice.soademo.orgtypes String param0, WebParamname = param1, targetNamespace = http:rapidservice.soademo.orgtypes String param1, WebParamname = param2, targetNamespace = http:rapidservice.soademo.orgtypes String param2, WebParamname = param3, targetNamespace = http:rapidservice.soademo.orgtypes String param3, WebParamname = param4, targetNamespace = http:rapidservice.soademo.orgtypes String param4 { Quote priceQuote = new Quote; priceQuote.setSupplierNameRapidDistributors; priceQuote.setSupplierPrice5000; return priceQuote; } 6. Save your changes to the RapidService project. A.8.6.2 Compiling and Deploying the RapidService Project To compile and redeploy the Fulfillment project: 1. Right-click the project in the Application Navigator.

2. From the context-menu, select Make RapidService.jpr.

3. Right-click the project again and select Deploy RapidService.

Oracle JDeveloper displays the first page of the Deployment wizard. 4. Follow the instructions on the wizard pages to deploy the project on the SoademoApplicationServer . A.8.7 CustomerService The CustomerService project is an EJB implementation that provides methods that enable client applications, such as the SOADemo-Client application, to retrieve customer information from the database and add customers to the database. This project is a Java EE Web services project. Before you proceed, refer to Section A.8.1, About the CreditService, RapidService, and CustomerService Projects . Before you can compile and deploy the project, there some changes you have to make in Oracle JDeveloper 11g. ■ Modifying Specific CustomerService Project Class Files ■ Modifying the persistence.xml File in the CustomerService Project ■ Compiling and Deploying the CustomerService Project A.8.7.1 Modifying Specific CustomerService Project Class Files To modify the CustomerService project in Oracle JDeveloper 11g, you must modify the following files in the srcorgsoademocustomerservice directory of the project: ■ businessCustomerservice.java: 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