Introducing Web Services
11g Release 1 (11.1.1.7)
E14294-07
July 2015
This document provides an overview of Web services in Oracle Fusion Middleware 11g. Sections include:
A Web service is a program that can be accessed remotely using different standards-based languages. What this program can do (that is, the functionality it implements) is described in a standard vocabulary.
Major benefits of Web services include:
Interoperability among distributed applications that span diverse hardware and software platforms
Easy, widespread access to applications through firewalls using Web protocols
A cross-platform, cross-language data model that facilitates developing heterogeneous distributed applications
Web services are characterized by three factors:
What they do (the business functionality they expose).
Where they are (the web site which exposes that functionality).
How they can be accessed (the set of published interfaces necessary to use the exposed functionality).
In summary, Web services are loosely coupled, distributed environments that allow companies to integrate heterogeneous applications within the enterprise or expose business functions to their customers and partners over the Internet. Because you access Web services using standard Web protocols such as XML or HTTP, the diverse and heterogeneous applications on the Web (which typically already understand XML and HTTP) can automatically access Web services and communicate with each other.
Table 1 lists the supported Web service protocols.
Table 1 Supported Web Service Protocols
Protocol | Description |
---|---|
Simple Object Access Protocol (SOAP) |
A protocol for exchanging structured information in the implementation of Web services. For more information, see "SOAP Web Services". |
Representational State Transfer (REST) |
Any simple interface that transmits data over a standardized interface (such as HTTP) without an additional messaging layer, such as SOAP. For more information, see "RESTful Web Services". |
SOAP provides a protocol for exchanging structured information in the implementation of Web services. SOAP Web services rely on XML-based and other industry standards:
Simple Object Access Protocol (SOAP)—A protocol for exchanging structured information in the implementation of Web services.
Extensible Markup Language (XML)—A data format that allows uniform communication between Web services consumers and Web services providers.
XML Schema—A framework that describes XML vocabularies used in business transactions.
Web Services Description Language (WSDL)—An XML-based language providing a model for describing SOAP-based Web services.
WS-Policy—The WS-Policy framework provides a flexible and extensible grammar for describing the capabilities, requirements, and general characteristics of Web services using policies.
Universal Description, Discovery, and Integration (UDDI)—A framework to publish and look up Web services on the Internet.
For example, a banking Web service may implement functions to check an account, print a statement, and deposit and withdraw funds. These functions are described in a WSDL file that any consumer can invoke to access the banking Web service. As a result, a consumer does not have to know anything more about a Web service than the WSDL file that describes what it can do.
A Web service consumer (such as, a desktop application or a Java Platform, Enterprise Edition client such as a portlet) invokes a Web service by submitting a request in the form of an XML document to a Web service provider. The Web service provider processes the request and returns the result to the Web service consumer in an XML document as shown in the example below.
Figure 1 Example of SOAP Message Exchange Between Web Service Consumer and Provider
In this example, the Web service consumer sends a request in the form of a SOAP message (SOAP is an XML messaging framework designed to allow heterogeneous applications to exchange structured information in a distributed environment). The Web service provider (www.xmethods.com) processes the request and returns the response, in this case the stock quote for Oracle. In the example above, the Web service provider may have asked for credentials to access the service, for example a username and a password. Also, the Web service provider may have encrypted the response (the value of the stock).
REST describes any simple interface that transmits data over a standardized interface (such as HTTP) without an additional messaging layer, such as SOAP. REST provides a set of design rules for creating stateless services that are viewed as resources, or sources of specific information, and can be identified by their unique URIs. A client accesses the resource using the URI, a standardized fixed set of methods, and a representation of the resource is returned. The client is said to transfer state with each new resource representation.
RESTful Web services are services that are built according to REST principles and, as such, are designed to work well on the Web. RESTful Web services conform to the architectural style constraints defined in "Introduction to the REST Architectural Style" in Using the Jersey JAX-RS Reference Implementation. Typically, RESTful Web services are built on the HTTP protocol and implement operations that map to the common HTTP methods, such as GET, POST, PUT, and DELETE to create, retrieve, update, and delete resources, respectively.
The Java API for RESTful Web Services (JAX-RS) provides support for creating Web services according to REST architectural style. JAX-RS uses annotations to simplify the development of RESTful Web services. By simply adding annotations to your Web service, you can define the resources and the actions that can be performed on those resources.
A JAX-RS resource is an annotated POJO that provides resource methods that are able to handle HTTP requests for URI paths that the resource is bound to. Consider the following example:
package com.example; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; /** * Root resource (exposed at "myresource" path) */ @Path("myresource") public class MyResource { /** * Method handling HTTP GET requests. The returned object will be sent * to the client as "text/plain" media type. * * @return String that will be returned as a text/plain response. */ @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; } }
In this example, the resource:
Exposes a single resource method that is able to handle HTTP GET requests.
Is bound to /myresource
URI path.
Can produce responses with response message content represented in text/plain
media type.
Returns the same "Got it!" response to all client requests.
RESTful Web services rely on the following industry standards:
Web Application Description Language (WADL)—An XML-based language providing a model for describing RESTful Web services.
WS-Policy—The WS-Policy framework provides a flexible and extensible grammar for describing the capabilities, requirements, and general characteristics of Web services using policies.
In Oracle Fusion Middleware 11g, there are two categories of Web services:
Oracle Infrastructure web services—SOA, Application Development Framework (ADF, and WebCenter), and Web Center services
Java EE web services—SOAP (Java API for XML Web Services (JAX-WS)) and RESTful (JAX-RS) web services
The following figure illustrates the two Web services categories.
Figure 2 Web Services in Oracle Fusion Middleware 11g
The following sections provide more detail about the Oracle Fusion Middleware 11g Web services architecture and each of the Web service components shown in the previous figure:
For a complete roadmap of all Web service development, security, and administration tasks, see "Roadmap for Implementing Oracle Fusion Middleware Web Services".
Table 2 summarizes the types of Web services supported in Oracle Fusion Middleware 11g.
Note:
All Web services and clients can be deployed to an Oracle Fusion Middleware environment that runs on Oracle WebLogic Server. Oracle WebLogic Web services can be deployed to a standalone Oracle WebLogic Server, as well.Table 2 Oracle Fusion Middleware Web Services
Web Service | Description |
---|---|
Java EE web service (SOAP and RESTful) |
SOAP Java EE web services are implemented according to the web services for Java EE specification, available at RESTful Java EE web services are implemented according to the JSR-311 JAX-RS 1.1 specification, defined at: For more information about developing WebLogic Web services, see:
You can deploy WebLogic Web services to any Oracle WebLogic Server environment, including a standalone environment. |
SOA service components |
SOA composite applications include SOA service components. SOA service components are the basic building blocks of SOA applications, implementing a part of the overall business logic functionality. The following SOA service components can be managed using Oracle WSM:
For more information about developing SOA service components, see Developer's Guide for Oracle SOA Suite. You can deploy SOA service components to the Oracle Fusion Middleware environment. |
SOA service binding components |
SOA Service binding components provide the outside world with an entry point to the SOA composite application. The WSDL file of the service advertises its capabilities to external applications. These capabilities are used for contacting the SOA composite application components. For more information, see Developer's Guide for Oracle SOA Suite. |
ADF Business Components |
ADF Business Components simplify the development, delivery, and customization of business applications for the Java EE platform by providing a library of reusable components and supporting design time facilities in Oracle JDeveloper. Using ADF Business Components, developers are not required to write the application infrastructure code required by the typical Java EE application to perform the following tasks:
Additionally, Oracle JDeveloper facilities expose ADF Business Component application modules that encapsulate built-in data manipulation operations and custom methods as Web services so that a service-enabled application module can be consumed across modules of the deploy Fusion Web application. For more information, see "Integrating Service-Enabled Application Modules" in Fusion Developer's Guide for Oracle Application Development Framework. |
WebCenter services |
WebCenter services expose Web 2.0 technologies for social networking and personal productivity, such as Wiki, RSS, and blogs. WebCenter provides a set of features and services (for example, portlets, customization, and content integration) that you can selectively add to your application. For more information about integrating WebCenter services, see Developer's Guide for Oracle WebCenter. |
Table 3 summarizes the types of Web service clients supported in Oracle Fusion Middleware 11g.
Table 3 Oracle Fusion Middleware Web Service Clients
Web Service Client | Description |
---|---|
Web service clients (SOAP and RESTful) |
Client applications that invoke Java EE web services can be written using any technology: Java, Microsoft .NET, and so on. There are two types of client applications:
For more information about developing WebLogic Web service clients, see:
|
SOA reference binding components |
SOA reference binding components connect the SOA composite application to external partners. For more information about developing SOA reference binding components, see Developer's Guide for Oracle SOA Suite. |
ADF Web applications |
ADF Web applications can invoke a service, such as a WebLogic Web service, a SOA composite application, or a service-enabled ADF application module. For more information, see Developer's Guide for Oracle SOA Suite. In addition, ADF Web applications can work with Web services in the user interface using a Web service data control. For more information about generating service-enabled application modules, calling a Web service from an ADF application module, or creating Web service data controls, see Fusion Developer's Guide for Oracle Application Development Framework. |
WebCenter portlets |
WebCenter portlets enable you to surface WebCenter services. For more information about developing WebCenter portlets, see Developer's Guide for Oracle WebCenter. |
As shown in Figure 2, there are two types of policies that can be attached to Web services.
Table 4 Types of Web Service Policies
Type of Policy | Description |
---|---|
Oracle Web Services Manager (WSM) Policy |
Policy provided by the Oracle WSM. For more information about the Oracle WSM and the predefined policies, see Oracle Fusion Middleware Security and Administrator's Guide for Web Services. You can attach Oracle WSM policies to Oracle Infrastructure Web services. You can only attach Oracle WSM security policies to WebLogic JAX-WS Web services. You manage Oracle WSM policies from Oracle Enterprise Manager Fusion Middleware Control. |
WebLogic Web Service Policy |
Policy provided by WebLogic Server. For more information about the WebLogic Web service policies, see Securing WebLogic Web Services for Oracle WebLogic Server. A subset of WebLogic Web service policies interoperate with Oracle WSM policies. For more information, see "Interoperability with Oracle WebLogic Server 11g Web Service Security Environments" in the Interoperability Guide for Oracle Web Services Manager. You manage WebLogic Web service policies from WebLogic Administration Console. |
Note:
It is recommended that you use Oracle WSM policies over WebLogic Web services whenever possible. You cannot mix your use of Oracle WSM and WebLogic Web service policies on the same Web service.To develop Web services, you can use the tools described in the following table, or your favorite IDE.
Table 5 Tools for Web Service Development
Tool | Description |
---|---|
Oracle JDeveloper |
Provides powerful tools that help you discover and use existing Web services, and develop and deploy new Web services. For more information, see the Oracle JDeveloper online help. |
Ant |
Uses XML-based configuration files (called build.xml by default) to execute tasks written in Java. Ant is a Java-based build tool, similar to the make command but much more powerful. For more information, see "Ant Task Reference" in WebLogic Web Services Reference for Oracle WebLogic Server. |
WebLogic Server Scripting Tool (WLST) |
Enables administrators to view and configure Web services, and manage Web service policies from the command line. For more information, see WebLogic Scripting Tool Command Reference. |
Oracle Enterprise Pack for Eclipse (OEPE) |
Provides a collection of plug-ins to the Eclipse IDE platform that facilitate development of WebLogic Web services. For more information, see the Eclipse IDE platform online help. |
Oracle Workshop |
Provides a collection plug-ins to the Eclipse IDE platform that facilitate development of WebLogic Web services. For more information, see
NOTE: Oracle Workshop is deprecated, and is being replaced by OEPE, described above. |
To secure and administer Web services, the tools that you use vary depending on the Web service type.
Table 6 Tools for Web Service Security and Administration
To secure and administer . . . | Use. . . |
---|---|
Oracle Infrastructure Web Services |
|
WebLogic Web Services |
|
The following sections provide roadmaps of common tasks for developing, securing, and administering Oracle Fusion Middleware Web services. Roadmaps are presented for each Web service category shown in Figure 2:
Roadmap for Implementing Oracle Infrastructure Web Services and Clients
Roadmap for Implementing WebLogic (Java EE) Web Services and Clients
The following sections provides roadmaps of common tasks for developing, securing, and administering Oracle Infrastructure Web services:
Table 7 summarizes the roadmap for implementing SOA composite services and clients.
Table 7 Roadmap for Implementing SOA Composite Services and Clients
Task | More Information |
---|---|
Develop SOA composite Web services and clients |
|
Deploy Web services |
|
Administer Web services |
Part II: "Basic Administration" and Part III "Advanced Administration" in Security and Administrator's Guide for Web Services |
Create policies |
"Managing Web Service Policies" in Security and Administrator's Guide for Web Services |
Create custom assertions |
"Creating Custom Assertions" in Extensibility Guide for Oracle Web Services Manager |
Attach policies (development time—Oracle JDeveloper) |
"Managing Policies" in Developer's Guide for Oracle SOA Suite |
Attach policies (deployment time—Oracle Enterprise Manager Fusion Middleware Control) |
|
Configure policies |
|
Test Web services |
"Testing Web Services" in Security and Administrator's Guide for Web Services |
Monitor Web service performance |
"Monitoring the Performance of Web Services" in Security and Administrator's Guide for Web Services |
Manage application migration between environments |
"Managing Application Migration Between Environments" in Security and Administrator's Guide for Web Services |
Diagnose problems |
"Diagnosing Problems" in Security and Administrator's Guide for Web Services |
Interoperate with:
|
Table 8 summarizes how to implement ADF components and clients.
Table 8 Roadmap for Implementing ADF Components and Clients
Task | More Information |
---|---|
Develop ADF components and clients |
|
Deploy Web services |
|
Administer Web services |
Part II: "Basic Administration" and Part III "Advanced Administration" in Security and Administrator's Guide for Web Services |
Create policies |
"Managing Web Service Policies" in Security and Administrator's Guide for Web Services |
Create custom assertions |
"Creating Custom Assertions" in Extensibility Guide for Oracle Web Services Manager |
Attach policies (development time—Oracle JDeveloper) |
"Securing Web Service Data Controls" in Fusion Developer's Guide for Oracle Application Development Framework |
Attach policies (deployment time—Oracle Enterprise Manager Fusion Middleware Control) |
"Attaching Policies to Web Services" in Security and Administrator's Guide for Web Services |
Configure policies |
|
Test Web services |
"Testing Web Services" in Security and Administrator's Guide for Web Services |
Monitor Web service performance |
"Monitoring the Performance of Web Services" in Security and Administrator's Guide for Web Services |
Manage application migration between environments |
"Managing Application Migration Between Environments" in Security and Administrator's Guide for Web Services |
Diagnose problems |
"Diagnosing Problems" in Security and Administrator's Guide for Web Services |
Interoperate with:
|
Table 9 summarizes the roadmap for implementing WebCenter services and clients.
Table 9 Roadmap for Implementing WebCenter Services and Clients
Task | More Information |
---|---|
Develop WebCenter services and clients |
|
Deploy WebCenter services |
|
Administer WebCenter services |
Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter |
Create policies |
"Managing Web Service Policies" in Security and Administrator's Guide for Web Services |
Create custom assertions |
"Creating Custom Assertions" in Extensibility Guide for Oracle Web Services Manager |
Attach policies (deployment time—Oracle Enterprise Manager Fusion Middleware Control) |
|
Configure policies |
|
Test WebCenter services |
"Testing and Deploying Your WebCenter Application" in Developer's Guide for Oracle WebCenter |
Monitor WebCenter service performance |
Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter |
Manage application migration between environments |
"Managing Application Migration Between Environments" in Security and Administrator's Guide for Web Services |
Diagnose problems |
"Diagnosing Problems" in Security and Administrator's Guide for Web Services |
Interoperate with:
|
The following table provides a roadmap of common tasks for developing, securing, and administering WebLogic (Java EE) Web services and clients.
Table 10 Roadmap for Implementing WebLogic (Java EE) Web Services and Clients
Task | More Information |
---|---|
Develop WebLogic Web services and clients |
|
Deploy Web services |
|
Administer Web services |
"Web Services" in WebLogic Server Administration Console Online Help |
Create Oracle WSM policies |
"Managing Web Service Policies" in Security and Administrator's Guide for Web Services |
Create WebLogic Web service policies |
|
Configure Oracle WSM policies |
|
Configure WebLogic Web service policies |
|
Create custom Oracle WSM policy file |
"Creating Custom Assertions" in Extensibility Guide for Oracle Web Services Manager |
Create custom WebLogic Web service policy file |
"Creating and Using a Custom Policy File" in Securing WebLogic Web Services for Oracle WebLogic Server |
Attach Oracle WSM policies (development time—Oracle JDeveloper) |
|
Attach WebLogic Web service policies (development time—Oracle JDeveloper) |
|
Attach Oracle WSM policies (deployment time) |
|
Attach WebLogic Web service policies (deployment time) |
"Associate a WS-Policy file with a Web Service" in WebLogic Server Administration Console Online Help |
Attach Oracle WSM to servlet applications |
|
Test Web services |
|
Monitor Web service performance |
|
Interoperate WebLogic and Oracle WSM Web service policies |
The following table summarizes the documentation that is related to Web services development, security, and administration.
Table 11 Related Documentation
Document | Description |
---|---|
Introducing Web Services |
This document. Provides an introduction to Web services for Oracle Fusion Middleware 11g. |
Describes how to secure and administer Oracle Infrastructure Web services. |
|
Describes how to build custom assertions for Oracle Web Services Manager (Oracle WSM). |
|
Describes how to implement the most common Oracle WSM interoperability scenarios. |
|
Introduces concepts that are relevant to Oracle Infrastructure Web services. |
|
Introducing WebLogic Web Services for Oracle WebLogic Server |
Introduces WebLogic Web services, the standards that are supported, interoperability information, and relevant samples and documentation. |
Getting Started With JAX-WS Web Services for Oracle WebLogic Server |
Provides the basic knowledge and tasks required to program a simple WebLogic Web service using JAX-WS. The guide includes use cases and examples, iterative development procedures, typical JWS programming steps, data type information, and how to invoke a Web service. |
Programming Advanced Features of JAX-WS Web Services for Oracle WebLogic Server |
Describes how to program more advanced features using JAX-WS, such as callbacks, XML Catalog, and SOAP message handlers. |
Using the Jersey JAX-RS Reference Implementation |
Describes how to use the Jersey JAX-RS Reference Implementation (RI) with Oracle Fusion Middleware 11g to develop and secure RESTful Web services and clients. |
Getting Started With JAX-RPC Web Services for Oracle WebLogic Server |
Provides the basic knowledge and tasks required to program a simple WebLogic Web service using JAX-RPC. The guide includes use cases and examples, iterative development procedures, typical JWS programming steps, data type information, and how to invoke a Web service. |
Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server |
Describes how to program more advanced features using JAX-RPC, such as Web service reliable messaging, callbacks, conversational Web services, use of JMS transport to invoke a Web service, and SOAP message handlers. |
Describes how to program and configure message-level (digital signatures and encryption), transport-level, and access control security for a Web service. |
|
Provides reference information on JWS annotations, Ant tasks, reliable messaging WS-Policy assertions, security WS-Policy assertions, and deployment descriptors. |
|
Describes how to develop SOA composite services. |
|
Fusion Developer's Guide for Oracle Application Development Framework |
Describes how to develop ADF components. |
Describes how to develop WebCenter services. |
|
"Developing with Web Services" in the Oracle JDeveloper online help |
Describes how to develop Web services and attach policies using Oracle JDeveloper. |
Explains how to use Workshop to write and manage source code and design with sophisticated visual tools and Java frameworks. NOTE: Oracle Workshop is deprecated, and is being replaced by OEPE, described above. |
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
.
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
if you are hearing impaired.
Oracle Fusion Middleware Introducing Web Services, 11g Release 1 (11.1.1.7)
E14294-07
Copyright © 2007, 2015, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.