Deploying Web Services

Now that we ve created three different Web Services (i.e., stateless and stateful Java class-based Web Service and a PL/SQL-based Web Service), it s time to deploy our Web Services to an application server. As the Web Services were created, we were asked where we plan to deploy each one. A deployment profile (i.e., WebServices .deploy) was created based on your answer to this question.

At a minimum, you must include the Oracle SOAP library into your project. The Java classes that we deployed will require additional Java libraries. For our example Java classes, the specific JDBC libraries are required. If we re only going to connect to an Oracle Database via JDBC, this library is already included in the application server. In this example, we re going to include the Periscope libraries and a number of JDBC libraries.

First, we must include the libraries into our project. This is accomplished by editing the project properties. If you double-click the Project icon in the Application Navigator window, you ll be able to edit the project Libraries properties, as shown in Figure 17-24. We added the periscopeCom, JDBC Libraries, and Oracle SOAP to the Selected Libraries section.

click to expand
Figure 17-24: Editing project libraries

Now it is time to edit the WebServices deployment profile to include the libraries for deployment. Double-click the WebServices.deploy icon and select the WEB-INF/lib section. As shown in Figure 17-25, you can include the libraries (probably the same libraries as above) needed to deploy this Web Service, and you can select the contributor libraries from the list of libraries set in the project properties.

click to expand
Figure 17-25: Web Archieve (WAR) deployment profile library settings

When you re done selecting the libraries to include in the deployment, click OK. As shown in Figure 17-26, in the Applications Navigator right-click the WebServices.deploy icon and select Deploy to. Choose the application server profile (most likely previously created) to which you wish to deploy these Web Services.

click to expand
Figure 17-26: Deploy the Web Service

In the message window at the bottom of the JDeveloper window, a log of tasks to deploy the Web Services to the application server is displayed. That log might look something like this:

 Deployment started.      Jun 6, 69096798 2:45:52 AM Target platform is Standalone OC4J (AppServerConnection1). Wrote WAR file to C:\Periscope\Oracle10gWebServices\Project\WebServices.war Wrote EAR file to C:\Periscope\Oracle10gWebServices\Project\Oracle10gWebServices-Project- WS.ear Invoking OC4J admin tool... C:\oracle\JDeveloper905\jdk\jre\bin\javaw.exe -jar C:\OC4J\j2ee\home\admin. jar ormi://tuscbdb3/ admin **** -deploy -file C:\Periscope\Oracle10gWebServices\Project\ Oracle10gWebServices-Project-WS. ear -deploymentName Oracle10gWebServices-Project-WS Notification ==> Application Deployer for Oracle10gWebServices-Project-WS  STARTS [ 2004-02-08T00:15:01.167MST ] Notification ==> Undeploy previous deployment Notification ==> Copy the archive to C:\OC4J\j2ee\home\applications\Oracle10gWebServices- Project-WS.ear Notification ==> Unpacking Oracle10gWebServices-Project-WS.ear Notification ==> Done unpacking Oracle10gWebServices-Project-WS.ear Notification ==> Initialize Oracle10gWebServices-Project-WS.ear begins... Notification ==> Unpacking WebServices.war Notification ==> Done unpacking WebServices.war Notification ==> Initialize Oracle10gWebServices-Project-WS.ear ends... Notification ==> Initialize WebServices begins... Notification ==> Initialize WebServices ends... Notification ==> Application Deployer for Oracle10gWebServices-Project-WS  COMPLETES [ 2004-02-08T00:15:14.166MST ] Exit status of OC4J admin tool (-deploy): 0 C:\oracle\JDeveloper905\jdk\jre\bin\javaw.exe -jar C:\OC4J\j2ee\home\admin. jar ormi://tuscbdb3/ admin **** -bindWebApp Oracle10gWebServices-Project-WS  WebServices http-web-site /Oracle10gWebServices-Project-context-root Exit status of OC4J admin tool (-bindWebApp): 0 Use the following context root(s) to test your web application(s): http://tuscbdb3:8888/Oracle10gWebServices-Project-context-root Elapsed time for deployment:  1 minute, 55 seconds   Deployment finished.      Jul 7, 68300421 5:27:17 AM 

JDeveloper s one-click deployment makes it easy to deploy your Web Services.

Publishing Your Web Service to UDDI

Your Web Service can be published to Oracle s UDDI at http://otn.oracle.com/uddi/ui/publishingBase.jsp. You can get more information about UDDI at http://otn.oracle.com/tech/webservices/htdocs/uddi/index.html. The connections manager allows you to drill into each of the UDDI Registries.



Oracle Application Server 10g Web Development
Oracle Application Server 10g Web Development (Oracle Press)
ISBN: 0072255110
EAN: 2147483647
Year: 2004
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net