Skip Headers
Oracle® SOA Suite Developer's Guide
10g (10.1.3.1.0)

Part Number B28764-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5.1 Introduction to Web Services and SOA

Web services is the term for a technology that consists of a set of messaging protocols and programming standards that expose business functions over the Internet using open XML-based standards. An individual web service is a discrete reusable software component that is accessed programmatically over the Internet, using HTTP/HTTPS but you can also invoke them using other protocols, such as JMS or SMTP, to return a response.

Web services allow enterprises to expose business functionality irrespective of the platform or language of the originating application, because the business functionality is exposed in such a way that it is abstracted to a message composed of standard XML constructs that can be recognized and used by other applications.

Web services are modular business services that can be easily integrated and reused, and it is this that makes them ideally suited as components within service-oriented architecture (SOA). OracleAS SOA helps you to create top-down and bottom-up web services or to create web services from existing functionality. You can do this using JDeveloper, alternatively you use Ant or integrate the Oracle SOA Suite with another tool. This chapter describes how to use JDeveloper as part of the SOA Suite to develop and use web services.

JDeveloper provides wizards and other tools to develop web services that are J2EE 1.4-compliant, with the ability to create JAX-RPC clients and services. In addition JDeveloper automatically generates web service metadata tag annotations into implementation classes (for compliance with JSR-181). There is support for defining:

Web services can then be incorporated into SOA applications. The service is linked to a BPEL process (orchestration) (see Chapter 7, "Using Oracle BPEL Process Manager"), and ESB provides integration for the application (see Chapter 6, "Using Oracle Enterprise Service Bus"). Web services security is defined using OWSM (see Chapter 10, "Securing the System").

Before describing how to use JDeveloper to create, test, and deploy web services, or alternatively, use existing web services in an application, it is useful to describe the XML standards on which web services are based.

5.1.1 Simple Object Access Protocol

The Simple Object Access Protocol (SOAP) is an XML-based protocol that is used for the sending and receiving of messages over a transport protocol, usually HTTP or SMTP. The SOAP specification, which you can read at the web site of the World Wide Web Consortium, at www.w3c.org/TR/SOAP, provides a standard way to encode requests and responses. It describes the structure and data types of message payloads using XML Schema.

A SOAP message is constructed of the following components:

  • A SOAP envelope comprising:

    • The SOAP Header (optional) which contains behavioral information used for security, reliability, and so on.

    • The SOAP body, which contains the message exchanged between the client and server.

  • A protocol binding that specifies how the SOAP envelope is sent. JDeveloper creates web services that use HTTP, and it also can generate WSIF bindings.

Web services are created using SOAP, the XML protocol for expressing data as XML and transporting it across the Internet using HTTP, and SOAP allows for more than one way of converting data to XML and back again. JDeveloper supports SOAP RPC encoding, SOAP RPC-literal style, and document-literal style (also known as message style).

JDeveloper creates standard J2EE 1.4 platform services that use JAX-RPC.

5.1.2 Web Services Description Language

The Web Services Description Language (WSDL) is an XML language used to describe the syntax of web services interfaces and their locations. Each web service has a WSDL document that contains all the information needed to use the service, the location of the service, its name, and information about the methods that the web service exposes. Alternatively, you can use a WSDL as the starting point for a top-down web service.

When you use one of JDeveloper's web service publishing wizards to produce your web service, the WSDL document for your service is automatically generated.

Figure 5-1 below shows part of the WSDL document generated by JDeveloper for the RapidService web service. It provides an illustration of the XML structure of a WSDL document.

Figure 5-1 RapidService.wsdl in JDeveloper's XML Editor

Description of Figure 5-1 follows
Description of "Figure 5-1 RapidService.wsdl in JDeveloper's XML Editor"

You can also view and edit a WSDL in design view as shown in Figure 5-2.

Figure 5-2 RapidService.wsdl in JDeveloper's WSDL Editor

Description of Figure 5-2 follows
Description of "Figure 5-2 RapidService.wsdl in JDeveloper's WSDL Editor"

The web service is described under the following headings: Services, Bindings, Port Types, Messages. You can reverse the order of these by clicking Switch View.

5.1.3 Universal Description, Discovery, and Integration

Universal Description, Discovery, and Integration (UDDI) provides a standards-based way of locating web services either by name or by industry category. UDDI registries can be public or private, such as a UDDI registry used within an organization.

Oracle Service Registry, which is part of Oracle SOA suite, provides a UDDI v3-compliant platform for publishing, categorizing and discovering web services and related resources across the enterprise. The Registry:

  • Enables service providers to expose and advertise service offerings

  • Allows service consumers to find, access and/or invoke services that meet defined criteria

Oracle Service Registry is integrated with the BPEL Process Manager, Oracle Web Services Manager and JDeveloper via the interoperable UDDI browsers in those products.

JDeveloper's UDDI browser, in the Connection Navigator, stores information about a UDDI registry and allows you to search a UDDI registry using search criteria that you specify to find web services that are described by WSDLs. JDeveloper comes with a preconfigured connection to the XMethods public UDDI registry, and you can also create your own registry connections to public or private UDDI registries. You can find the connection descriptor properties file, which contains the enquiry endpoint and the business keys of the registry, at <jdev_install>/system<release_and_build_number>/uddiconnections.xml, where <jdev_install> is the root directory in which JDeveloper is installed.


Note:

If you have problems connecting to the preconfigured UDDI registry in JDeveloper or another external UDDI registry and you are behind a firewall, check the proxy server settings JDeveloper uses when you run web applications or access web services. In JDeveloper, choose Tools > Preferences | Web Browser and Proxy. Enter or change the proxy settings in this dialog. For more information, click Help the dialog.

JDeveloper's Find Web Service wizard browses UDDI registries to find web services by either name or category. You must have an appropriate connection from your machine so that JDeveloper can make a connection to the UDDI registry you select, for example, a connection the Internet if you want to search a public UDDI registry, and you can only generate a proxy to a web service that has a check in the "Is WSDL?" column, which identifies the registry entry as being defined by a WSDL document.

Figure 5-3 illustrates the report of a web service found in the XMethods UDDI registry using the Find Web Service wizard.

Figure 5-3 Report Produced by the Find Web Service Wizard

Description of Figure 5-3 follows
Description of "Figure 5-3 Report Produced by the Find Web Service Wizard"

This figure illustrates the data structure types used in UDDI:

  • Service details: This section gives information about the service, including the name.

  • Business entity: This is the top-level data structure, called businessEntity, that contains information about the business providing the web service.

  • Service bindings: This contains the bindingTemplate that contains information about the service access point, and the tModel that gives the technical specification of the web service.