Download presentation
Presentation is loading. Please wait.
Published byEmily Garza Modified over 11 years ago
1
19 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Developing Web Services
2
19-2 Copyright © 2005, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Identify the components that can be exposed as Web services with Oracle Application Server 10g Develop, deploy, and test a stateless Java class Web service by using Oracle JDeveloper 10g Use the Web services home page to test the deployed Web service Identify the steps that are involved in exposing a PL/SQL stored procedure as a Web service
3
19-3 Copyright © 2005, Oracle. All rights reserved. Oracle Application Server 10g Web Services Oracle Application Server 10g Web services can be implemented as any of the following: Stateless and stateful Java classes Stateless PL/SQL packages Stateless session Enterprise JavaBeans (EJBs) Java Message Service (JMS) destinations
4
19-4 Copyright © 2005, Oracle. All rights reserved. Developing a Web Service with a Stateless Java Class 1.Define an interface. 2.Define a stateless Java class. 3.Generate an.ear file. 4.Deploy the generated.ear file to Oracle Application Server 10g.
5
19-5 Copyright © 2005, Oracle. All rights reserved. Defining an Interface
6
19-6 Copyright © 2005, Oracle. All rights reserved. Defining an Interface
7
19-7 Copyright © 2005, Oracle. All rights reserved. Defining a Stateless Java Class
8
19-8 Copyright © 2005, Oracle. All rights reserved. Defining a Stateless Java Class
9
19-9 Copyright © 2005, Oracle. All rights reserved.
10
19-10 Copyright © 2005, Oracle. All rights reserved. Creating the Web Service
11
19-11 Copyright © 2005, Oracle. All rights reserved. Creating the Client Application
12
19-12 Copyright © 2005, Oracle. All rights reserved. Creating the Client Application
13
19-13 Copyright © 2005, Oracle. All rights reserved. Deploying the Web Service
14
19-14 Copyright © 2005, Oracle. All rights reserved. Testing the Web Service
15
19-15 Copyright © 2005, Oracle. All rights reserved. Web Service Home Page A Web service home page provides: A link to the service description (WSDL file) Links to Web service test pages to test the available operations of the Web service Links to the Web service client-side Proxy Jar Links to the Web service client-side Proxy Source
16
19-16 Copyright © 2005, Oracle. All rights reserved. Testing the Deployed Web Service with Home Page
17
19-17 Copyright © 2005, Oracle. All rights reserved. Testing the sayHello Operation
18
19-18 Copyright © 2005, Oracle. All rights reserved. Testing the sayHello Operation
19
19-19 Copyright © 2005, Oracle. All rights reserved. Serializing and Encoding Parameters and Results Oracle Application Server 10g Web services support a prepackaged implementation for handling encoding, decoding, serialization, and deserialization. Oracle Application Server 10g supports the following encoding mechanisms: –Standard SOAP v.1.1 encoding –Literal XML encoding
20
19-20 Copyright © 2005, Oracle. All rights reserved. Developing a Stored Procedure Web Service 1.Set up data sources in OC4J by configuring the data-sources.xml file in the ORACLE_HOME\j2ee\home\config folder. 2.Generate the Java wrapper classes for the PL/SQL package and generate the EAR file. 3.Deploy the EAR file to Oracle Application Server 10g or stand-alone OC4J to expose it as a Web service.
21
19-21 Copyright © 2005, Oracle. All rights reserved. Generating Wrapper Classes Using JPublisher DatabaseJPublisher Java classes
22
19-22 Copyright © 2005, Oracle. All rights reserved. Exposing a Function as a Web Service by Using Oracle JDeveloper 10g
23
19-23 Copyright © 2005, Oracle. All rights reserved. Publishing the Package as a Web Service
24
19-24 Copyright © 2005, Oracle. All rights reserved. JMS Web Services Oracle Application Server 10g supplies a servlet to support two operations on messages: – Send operation – Receive operation The JMS Web service determines how to handle incoming and outgoing messages from JMS destinations. JMS messages can be processed on the server side by: –Message-Driven Bean (MDB) –JMS client
25
19-25 Copyright © 2005, Oracle. All rights reserved. JMS Web Services
26
19-26 Copyright © 2005, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Expose a stateless Java class as a Web service Test the Web service with the Web service home page Use Oracle JDeveloper 10g to develop, deploy, and test Web services Expose a PL/SQL stored procedure as a Web service
27
19-27 Copyright © 2005, Oracle. All rights reserved. Practice 19-1: Overview This practice covers the following topics: Exposing a stateless session bean as Web service by using Oracle JDeveloper 10g Deploying the Web service to an embedded OC4J server and testing it with a client application Deploying the Web service to Oracle Application Server 10g and testing it with the Web services home page
28
19-28 Copyright © 2005, Oracle. All rights reserved.
29
19-29 Copyright © 2005, Oracle. All rights reserved.
30
19-30 Copyright © 2005, Oracle. All rights reserved.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.