# Getting Started: Web Service Core Concepts

This topic will familiarize you with the basic concepts of web service development.

## What is a Web Service?

A web service is a set of functions packaged into a single entity that is available to other systems on a network. The network can be a corporate intranet or the Internet. Other systems can call these functions to request data or perform an operation. Because they rely on basic, standard technologies which most systems provide, they are an excellent means for connecting distributed systems together.

### Standards-Based

Web services are built on standard technologies such as HTTP and XML. All web service messages are exchanged using a standard XML-messaging protocol known as SOAP, and web service interfaces are described using documents in the WSDL standard. These standards are all completely agnostic of the platform on which the web services were built. In short, the following standards are used:

- WSDL. A Web Service Description Language (WSDL) file describes how the web service is operated and how other software applications can interface with the web service. Think of a WSDL file as the instruction manual for a web service explaining how a user can draw on the resources provided by the web service.
- XML. Extensible Markup Language (XML) messages provide the common language by which different applications can talk to one another over a network. To operate a web service a user sends an XML message containing a request for the web service to perform some operation; in response the web service sends back another XML message containing the results of the operation.
- SOAP. Typically XML messages are formatted according to SOAP syntax. Simple Object Access Protocol (SOAP) specifies a standard format for applications to call each other's methods and pass data to one another. Note that other non-SOAP forms of XML messages are possible, depending on the specific requirements of the web service. (The type of XML message and the specific syntax required is given in the web service's WSDL file.)
- HTTP & JMS. To make web services accessible to other applications across networks, web services receive requests and send responses using widely used protocols such as HyperText Transfer Protocol (HTTP) and Java Message Service (JMS).

### Asynchrony

Many business processes take more than a few moments to complete; it could take a few minutes, even longer, or sometimes response time is variable and hard to predict. This is a problem for a synchronous relationship, in which a client invokes a method of the web service and is blocked from continuing its own processes until it receives the return value from the web service.

In WebLogic Workshop you can use asynchrony to overcome this problem. In asynchronous communication, the client communicates with the web service in such a way that it is not forced to halt its processes while the web service produces a response. In particular, the client invokes a method of the web service that immediately returns a simple acknowledgement to the client, thereby allowing the client to continue its own processes. When the web service has produced a response, it sends a callback method to the client containing that response. Asynchronous web services use conversations to correlate messages and manage state between message exchanges. This will ensure that the web service sends its response back to the correct client.

### Buffering

When a conversational web service's request method is called by multiple clients at the same time, a client might have to wait until its call, however short, has been processed by the web service. In addition, when a web service has completed processing multiple requests and needs to send multiple callback messages, it must wait for a message to be processed by the client before it can send the next callback. For a conversational web service, and especially for a web service receiving high-volume traffic, it is recommended to always add buffers to the web service's methods and callbacks. When clients call a buffered method, the call is stored in a buffer and the client does not have to wait for the web service to handle the call. When a web service sends a callback, the message is stored in a buffer and the web service does not have to wait until the client processes the callback.

## Designing Web Services with WebLogic Workshop

Web services are developed using WebLogic Workshop, a visual tool for designing J2EE applications. The image below shows the finished tutorial.

The Application tab (area 1) shows the application's source files. A web service is stored as a file with a JWS extension.

The main work area (area 2) shows the Design View or the Source view of the component you are building. In the above picture a web service is shown in Design View.

The Property Editor (area 3) allows you to see and set properties of a web service or web service method selected in the main area.

A web service project folder holds one or more web services used in the application. In this tutorial you will develop a web service in a web service project folder called MyJWSProject (area 4).

Related Topics

Getting Started with Web Services

Designing Asynchronous Interfaces

Using Buffering to Create Asynchronous Methods and Callbacks

Click one of the following arrows to navigate through the tutorial: