Skip navigation.
Downloads | Product Documentation | Support

Administration Console Online Help

# Web Services

[Attributes and Console Screen Reference for Web Services]

# Overview

Web services are a type of service that can be shared by and used as components of distributed Web-based applications. They commonly interact with existing back-end applications, such as customer relationship management systems, order-processing systems, and so on.

Typically, WebLogic Web services are assembled, packaged, and deployed as Enterprise Application files. The `*`.`ear` file contains a special Web application file (which contains an additional Web service-specific deployment descriptor file, `web-services.xml`) along with an optional EJB file. The `*.jar` contains the stateless session EJBs that implement the Web service. The `servicegen` Ant task, the standard way of assembling a WebLogic Web service, assembles all Web services as `EAR` files.

You can, however, also package a Web service as just a Web application `WAR` file if your Web service is implemented with a Java class.

Note: The Administration Console uses the icon to indicate the special Web application WAR file that contains the additional Web service-specific deployment descriptor file `web-services.xml`.

The following procedures show how to deploy and configure Web services that are packaged either as `*.ear` files or as `*.war` files.

For additional information about Web services, see Programming WebLogic Web Services.

# Tasks

## Configuring and Deploying a New Web Service

Web services can be packaged as Enterprise Application `*.ear` files (most typically) or as Web application `*.war` files. The following two procedures describe how to configure and deploy a Web service, depending on how you have packaged it.

### Configuring and Deploy a Web Service Packaged as an Enterprise Application File (EAR)

1. In the left pane of the Administration Console, expand the Deployments folder.
2. Right-click Applications, and select Deploy a New Application.
3. Use the location field to locate the Web service *.ear file you want to configure for use with WebLogic Server. You can also configure an "exploded" application directory. WebLogic Server deploys all components it finds in and below the specified directory.

If the `*.ear` does not reside on the Administration Server, use the upload link to upload it.

Note: The Administration Console upload functionality helps you upload a single archive file to the Administration Server machine for deployment. If you need to upload an exploded archive directory, see Weblogic.Deployer Tasks.

4. When you have located the archive file to configure, click Target Application.
5. If you have more than one server or cluster in your domain, select the one on which you want to deploy your new Web service and click Continue. If you have just one server in your domain, go to the next step.
6. Enter a name for the Web service in the Name field.

If you have more than one server or cluster in your domain, click in the Source Accessibility section whether you want to copy the file to each server.

7. Click Deploy. The Deploy panel displays deployment status and deployment activities for the Web service.
8. Use the available tabs as follows:

- Configuration—Define the general configuration of this Web service.
- Targets—Define additional servers or clusters on which you would like to deploy all of the modules in this Web service.
- Deploy—View the deployment status of each module in Web service, and to undeploy or redeploy individual modules.
- Notes—Include any additional information that describes the configuration of this Web service.

9. Click Apply.

### Configuring and Deploying a Web Service Packaged as a Web Application File (WAR)

1. In the left pane of the Administration Console, expand the Deployments folder.
2. Right-click Web Application Modules, and select Deploy a New Web Application Module.
3. Use the location field to locate the Web service *.war file you want to configure for use with WebLogic Server. You can also configure an "exploded" Web application directory. WebLogic Server deploys all components it finds in and below the specified directory.

If the `*.war` does not reside on the Administration Server, use the upload link to upload it.

Note: The Administration Console upload functionality helps you upload a single archive file to the Administration Server machine for deployment. If you need to upload an exploded archive directory, see Weblogic.Deployer Tasks.

4. When you have located the archive file to configure, click Target Module.
5. If you have more than one server or cluster in your domain, select the one on which you want to deploy your new Web service and click Continue. If you have just one server in your domain, go to the next step.
6. Enter a name for the Web service in the Name field.

If you have more than one server or cluster in your domain, click in the Source Accessibility section whether you want to copy the file to each server.

7. Click Deploy. The Deploy panel displays deployment status and deployment activities for the Web Service.
8. Use the available tabs as follows:

- Configuration—Define the general configuration of this Web service.
- Targets—Select additional independent servers, clusters, or virtual hosts on which you would like to deploy the Web service at server startup time.
- Deploy—View the deployment status of this Web service module, and undeploy, deploy, or redeploy the Web service.
- Monitoring—Monitor the Web services that are currently active.
- Testing—Invoke the Web Service Home Page and test it.
- Notes—Include any additional information that describes the configuration of this Web service.

9. Click Apply to apply all relevant changes.

## Viewing Deployed Web Services

Web services can be packaged as Enterprise Application `*.ear` files (most typically) or as Web application `*.war` files. The following procedure describes how to view deployed Web services, depending on how you have packaged them.

### Viewing a Deployed Web Service Packaged as an Enterprise Application File (EAR)

1. In the left pane of the Administration Console, expand the Deployments folder.
2. Expand the Applications folder.
3. Click the name of the deployed applications until you find one that includes a Web service `*.war` file component, indicated by the icon.
4. Click the name of the Web Service. Information about the Web Service appears in the right frame.

### Viewing a Deployed Web Service Packaged as a Web Application File (WAR)

1. In the left pane of the Administration Console, expand the Deployments folder.
2. Expand the Web Application Modules folder. The deployed Web services are indicated with the icon.
3. Click the name of the Web Service. Information about the Web Service appears in the right frame.

## Undeploying Deployed Web Services

Web services can be packaged as Enterprise Application `*.ear` files (most typically) or as Web application `*.war` files. The following procedure describes how to undeploy a deployed Web service, depending on how you have packaged it.

1. In the left pane of the Administration Console, expand the Deployments folder.
2. Click on the Applications folder name if the Web Service is packaged as an `*.ear` file or on the Web Application Modules folder name if the Web Service is packaged as a `*.war` file.
3. In the displayed table, click the name of the Web Service you want to undeploy.
4. Select the Deploy tab.
5. Click Stop Application if your Web Service is packaged as an `*.ear` file or Stop if your Web Service is packaged as a `*.war` file.

## Deleting a Web Service

Web services can be packaged as Enterprise Application `*.ear` files (most typically) or as Web application `*.war` files. The following procedure describes how to delete a Web service, depending on how you have packaged it.

1. In the left pane of the Administration Console, expand the Deployments folder.
2. Click on the Applications folder name if the Web Service is packaged as an `*.ear` file or on the Web Application Modules folder name if the Web Service is packaged as a `*.war` file. A table displays all deployed Enterprise or Web applications.
3. In this table, locate the Web service you want to delete and click the Garbage Can icon to the right of the file.
4. Click Yes to confirm your decision.
5. Click Continue to return to the previous screen.

## Viewing Web Service Deployment Descriptors

Web services can be packaged as Enterprise Application `*.ear` files (most typically) or as Web application `*.war` files. The following two procedures describe how to view (in read-only mode) the `web-services.xml` deployment descriptor file of a Web service, depending on how you have packaged it.

Note: You cannot use the Administration Console to update the `web-services.xml` file.

### Viewing Deployment Descriptors for a Web Service Packaged as an Enterprise Application File (EAR)

1. In the left pane of the Administration Console, expand the Deployments—>Applications folders.
2. Expand the folder for the Web service for which you want to view the `web-services.xml` deployment descriptor file.
3. Under the Web service `*.ear` file, click the name of the `*.war` file that contains the `web-services.xml` file, indicated with the icon.
4. In the right pane, select the Configuration—>Descriptor tabs.
5. Under the Deployment Descriptors section at the bottom of the right pane, click the `web-services.xml` link. You can also view the`web.xml` and `weblogic.xml` Web application deployment descriptors by clicking on the corresponding link.

### Viewing Deployment Descriptors for a Web Service Packaged as a Web Application File (WAR)

1. In the left pane of the Administration Console, expand the Deployments—>Web Applications Modules folders.
2. Click the name of the Web service for which you want to view the `web-services.xml` deployment descriptor file. Web services are indicated with the icon.
3. In the right pane, select the Configuration—>Descriptor tabs.
4. Under the Deployoment Descriptors section at the bottom of the right pane, click the `web-services.xml` link. You can also view the`web.xml` and `weblogic.xml` Web application deployment descriptors by clicking on the corresponding link.

## Testing a Web Service From Its Home Page

Every Web Service deployed on WebLogic Server has a Home Page. From the Home page you can:

- View the WSDL that describes the service.
- Test each operation with sample parameter values to ensure that it is working correctly.
- View the SOAP request and response messages from a successful execution of an operation.

The following procedure describes how to view the Home Page of a Web Service and use it to test its operations.

1. Follow the instructions in Viewing Deployed Web Services to view information about a particular Web Service.
2. In the right frame, select the Testing tab.
3. Click the Launch Test Page link. The Web Service Home Page displays in a new browser window.
4. To test a particular Web Service operation:

1. Click on the operation link.
2. Enter sample values for the parameters in the table. The first two columns of the table list the name and Java data type of the operation.
3. Click Invoke.

The SOAP request and response messages and the value returned by the operation are displayed in a new browser window.

The main Web Service Home Page also displays an example of the Java code to invoke one of the operations and a sample `build.xml` file for executing the `clientgen` Ant task to generate the Web Service-specific client JAR file.

## Configuring Web Service Reliable SOAP Messaging

Reliable SOAP messaging is a framework whereby an application running in one WebLogic Server instance can asynchronously and reliably invoke a Web Service running on another WebLogic Server instance.

Note: Reliable SOAP messaging also works between two Web Services deployed on a single WebLogic Server instance. Typically this setup is used for development. However, in real-life, reliable SOAP messaging is meant to be used between two WebLogic Server instances, both of which must be configured to use reliable SOAP messaging.

There is a sender WebLogic Server instance and a receiver. The sender has an application that asynchronously invokes a reliable Web Service operation running on the receiver. The sender sends the receiver a SOAP message that has reliable SOAP messaging information in its header. The Web Service operation being invoked has been configured for reliable SOAP messaging. Due to the asynchronous nature of the invocation, the sender does not immediately know whether the relevant operation has been invoked, but it has the guarantee that it will get one of two possible notifications:

- The message has been received by the receiver.

Note: This does not mean that the Web Service operation on the receiver WebLogic Server was successfully invoked; the operation might fail due to an application exception. The exception will be included in the notification to the sender.

- The sender was unable to deliver the message.

You can configure the current WebLogic Server as both a sender and a receiver of reliable SOAP messages, as described in:

- Configuring the Sender WebLogic Server Instance
- Configuring the Receiver WebLogic Server Instance

For additional information about reliable SOAP messaging, see Using Reliable SOAP Messaging.

### Configuring the Sender WebLogic Server Instance

This section describes how to configure default reliable SOAP messaging attributes for a WebLogic Server instance in its role as a sender of a reliable SOAP message.

1. In the left pane of the Administration Console, expand the Servers node.
2. Click the name of the WebLogic Server instance for which you want to configure reliable SOAP messaging in its role as a sender.
3. In the right pane, select the Services—>Web Services tabs.
4. Select the JMS store from the Store drop-down list that contains WebLogic Server's reliable SOAP messages when acting as a sender.

You must first create a JMS store before it appears in the drop-down list. For details, seeJMS Store Tasks and JMS JDBC Store Tasks.

5. In the Default Retry Count field, enter the default maximum number of times the sender WebLogic Server should attempt to resend a message.
6. In the Default Retry Interval field, enter the default minimum number of seconds that the sender WebLogic Server should wait between retries.
7. In the Default Time to Live field, enter the default minimum number of seconds that the receiver of the reliable SOAP message should persist its message in the receiver's persistent JMS store.

Warning: Do not set this value larger than the corresponding value of any Web service operation being invoked reliably. This value is configured in the Web service's `web-services.xml` file, in particular the `persist-duration` attribute of the `<reliable-delivery>` subelement of the invoked `<operation>`.

8. Click Apply.

### Configuring the Receiver WebLogic Server Instance

This section describes how to configure default reliable SOAP messaging attributes for a WebLogic Server instance in its role as a receiver of a reliable SOAP message.

1. In the left pane of the Administration Console, expand the Servers node.
2. Click the name of the WebLogic Server instance for which you want to configure reliable SOAP messaging in its role as a receiver.
3. In the right pane, select the Services—>Web Services tabs.
4. Select the JMS store from the Store drop-down list that will contain WebLogic Server's reliable SOAP messages when acting as a receiver.

You must first create a JMS store before it appears in the drop-down list. For details, see JMS Store Tasks and JMS JDBC Store Tasks.

5. Enter the default minimum number of seconds that the receiver of the reliable SOAP message should persist its message in the receiver's persistent JMS store in the Default Time to Live field.

Note: Each Web service operation can override this default value by setting the `persist-duration` of the `<reliable-delivery>` sublement of the corresponding `<operation>` element.

6. Click Apply.