11 WebLogic Server Web Services

A web service is a self-contained application that can be described, published, and invoked over a network, such as a corporate intranet or the Internet. Because you access web services using standard web protocols such as Extensible Markup Language (XML) and HTTP, the diverse and heterogeneous applications on the web (which typically already understand XML and HTTP) can access web services and communicate with each other automatically.

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 (XML) that facilitates developing heterogeneous distributed applications

Note:

The JAX-RPC API is deprecated in Oracle WebLogic Server as of version 12.2.1 and will be removed in a future release. Oracle recommends developing your web services using JAX-WS or JAX-RS.

This chapter includes the following topics:

Anatomy of a Web Service

Web services are characterized by three factors: what they do (the business functionality they expose), how they can be accessed (the set of published interfaces necessary to use the exposed functionality), and where they are (the web site which exposes that functionality).

What the web service can do is described in a standard XML vocabulary called Web Services Description Language (WSDL). 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 client (or consumer)--such as, a desktop application or a Java Platform, Enterprise Edition portlet-- invokes a web service by submitting a request in the form of an XML document to the web service. The web service processes the request and returns the result to the web service client in an XML document.

The web service client can send a request in the form of a Simple Object Access Protocol (SOAP) message. SOAP is an XML messaging framework designed to allow heterogeneous applications to exchange structured information in a distributed environment. In turn, the web service processes the request and returns the response in a SOAP message.

You can also develop Representational State Transfer (REST) web services, or "RESTful" web services. 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.

To secure the message exchange, the web service may require credentials to access the service, for example a username and a password, or encrypt the response.

Web Service Standards

Many specifications that define web service standards are written so as to allow for broad use of the specification throughout the industry. The implementation of a particular specification in Oracle WebLogic Server might not cover all possible usage scenarios covered by the specification. However, Oracle considers interoperability of web service platforms to be more important than providing support for all possible edge cases of the web service specifications.

Web services rely on a set of XML-based industry standards, including the following:

  • XML, a data format that allows uniform communication between services consumers and services providers

  • XML Schema, a framework that describes XML vocabularies used in business transactions

  • SOAP, a protocol for exchanging structured information in the implementation of services

  • WSDL, an XML-based language providing a model for describing services

  • WS-Policy, a framework that provides a flexible and extensible grammar for describing the capabilities, requirements, and general characteristics of services using policies

Roadmap for Web Services

The WebLogic Server documentation set includes several introductory, procedural, and reference topics, including examples, that help you understand how to develop and manage WebLogic web services.

Table 11-1 Roadmap for Web Services

Major Task Subtasks and Additional Information

Learning more about WebLogic web services

Using the samples (for WebLogic web service developers)

Developing web services using JAX-WS

Developing RESTful web services

Deploying and administering WebLogic web services

Securing WebLogic web services