Getting Started With WebLogic Web Services Using JAX-RPC
Administering Web Services
The following sections describe how to administer WebLogic Web Services:
- Overview of WebLogic Web Services Administration Tasks
- Administration Tools
- Using the Administration Console
- Using the WebLogic Scripting Tool
- Using WebLogic Ant Tasks
- Using the Java Management Extensions (JMX)
- Using the Java EE Deployment API
- Using Work Managers to Prioritize Web Services Work and Reduce Stuck Execute Threads
Overview of WebLogic Web Services Administration Tasks
When you use the jwsc Ant task to compile and package a WebLogic Web Service, the task packages it as part of an Enterprise Application. The Web Service itself is packaged inside the Enterprise application as a Web application WAR file, by default. However, if your JWS file implements a session bean then the Web Service is packaged as an EJB JAR file. Therefore, basic administration of Web Services is very similar to basic administration of standard Java Platform, Enterprise Edition (Java EE) Version 5 applications and modules. These standard tasks include:
- Installing the Enterprise application that contains the Web Service.
- Starting and stopping the deployed Enterprise application.
- Configuring the Enterprise application and the archive file which implements the actual Web Service. You can configure general characteristics of the Enterprise application, such as the deployment order, or module-specific characteristics, such as session time-out for Web applications or transaction type for EJBs.
- Creating and updating the Enterprise application's deployment plan.
- Monitoring the Enterprise application.
- Testing the Enterprise application.
The following administrative tasks are specific to Web Services:
- Configuring the JMS resources used by Web Service reliable messaging and JMS transport
- Configuring the WS-Policy files associated with a Web Service endpoint or its operations.
If you used the @Policy annotation in your Web Service to specify an associated WS-Policy file at the time you programmed the JWS file, you cannot change this association at run-time using the Administration Console or other administrative tools. You can only associate a new WS-Policy file, or disassociate one you added at run-time.
- Viewing the SOAP handlers associated with the Web Service.
- Viewing the WSDL of the Web Service.
- Creating a Web Service security configuration.
Administration Tools
There are a variety of ways to administer Java EE modules and applications that run on WebLogic Server, including Web Services; use the tool that best fits your needs:
- Using the Administration Console
- Using the WebLogic Scripting Tool
- Using WebLogic Ant Tasks
- Using the Java Management Extensions (JMX)
- Using the Java EE Deployment API
Using the Administration Console
The WebLogic Server Administration Console is a Web browser-based, graphical user interface you use to manage a WebLogic Server domain, one or more WebLogic Server instances, clusters, and applications, including Web Services, that are deployed to the server or cluster.
One instance of WebLogic Server in each domain is configured as an Administration Server. The Administration Server provides a central point for managing a WebLogic Server domain. All other WebLogic Server instances in a domain are called Managed Servers. In a domain with only a single WebLogic Server instance, that server functions both as Administration Server and Managed Server. The Administration Server hosts the Administration Console, which is a Web Application accessible from any supported Web browser with network access to the Administration Server.
You can use the System Administration Console to:
- Install an Enterprise application.
- Start and stop a deployed Enterprise application.
- Configure an Enterprise application.
- Configure Web applications.
- Configure EJBs.
- Create a deployment plan.
- Update a deployment plan.
- Test the modules in an Enterprise application.
- Configure JMS resources for Web Service reliable messaging.
- Associate the WS-Policy file with a Web Service.
- View the SOAP message handlers of a Web Service.
- View the WSDL of a Web Service.
- Create a Web Service security configuration
Invoking the Administration Console
To invoke the Administration Console in your browser, enter the following URL:
http://host:port/console
- host refers to the computer on which the Administration Server is running.
- port refers to the port number where the Administration Server is listening for connection requests. The default port number for the Administration server is 7001.
Click the Help button, located at the top right corner of the Administration Console, to invoke the Online Help for detailed instructions on using the Administration Console.
The following figure shows the main Administration Console window. Figure 7-1 WebLogic Server Administration Console Main Window
How Web Services Are Displayed In the Administration Console
Web Services are typically deployed to WebLogic Server as part of an Enterprise Application. The Enterprise Application can be either archived as an EAR, or be in exploded directory format. The Web Service itself is almost always packaged as a Web Application; the only exception is if your JWS file implements a session bean in which case it is packaged as an EJB. The Web Service can be in archived format (WAR or EJB JAR file, respectively) or as an exploded directory.
It is not required that a Web Service be installed as part of an Enterprise application; it can be installed as just the Web Application or EJB. However, Oracle recommends that users install the Web Service as part of an Enterprise application. The WebLogic Ant task used to create a Web Service, jwsc, always packages the generated Web Service into an Enterprise application.
To view and update the Web Service-specific configuration information about a Web Service using the Administration Console, click on the Deployments node in the left pane and, in the Deployments table that appears in the right pane, locate the Enterprise application in which the Web Service is packaged. Expand the application by clicking the + node; the Web Services in the application are listed under the Web Services category. Click on the name of the Web Service to view or update its configuration.
The following figure shows how the HelloWorldService Web Service, packaged inside the helloWorldEar Enterprise application, is displayed in the Deployments table of the Administration Console. Figure 7-2 Web Service Displayed in Deployments Table of Administration Console
Creating a Web Services Security Configuration
When a deployed WebLogic Web Service has been configured to use message-level security (encryption and digital signatures, as described by the WS-Security specification), the Web Services runtime determines whether a Web Service security configuration is also associated with the service. This security configuration specifies information such as whether to use an X.509 certificate for identity, whether to use password digests, the keystore to be used for encryption, and so on. A single security configuration can be associated with many Web Services.
Because Web Services security configurations are domain-wide, you create them from the domainName > WebService Security tab of the Administration Console, rather than the Deployments tab. The following figure shows the location of this tab. Figure 7-3 Web Service Security Configuration in Administration Console
Using the WebLogic Scripting Tool
The WebLogic Scripting Tool (WLST) is a command-line scripting interface that you can use to interact with and configure WebLogic Server domains and instances, as well as deploy Java EE modules and applications (including Web Services) to a particular WebLogic Server instance. Using WLST, system administrators and operators can initiate, manage, and persist WebLogic Server configuration changes.
Typically, the types of WLST commands you use to administer Web Services fall under the Deployment category.
For more information on using WLST, see WebLogic Scripting Tool.
Using WebLogic Ant Tasks
WebLogic Server includes a variety of Ant tasks that you can use to centralize many of the configuration and administrative tasks into a single Ant build script. These Ant tasks can:
- Create, start, and configure a new WebLogic Server domain, using the wlserver and wlconfig Ant tasks.
- Deploy a compiled application to the newly-created domain, using the wldeploy Ant task.
See “Using Ant Tasks to Configure and Use a WebLogic Server Domain” and “wldeploy Ant Task Reference” in Developing Applications With WebLogic Server for specific information about the non-Web Services related WebLogic Ant tasks.
Using the Java Management Extensions (JMX)
A managed bean (MBean) is a Java bean that provides a Java Management Extensions (JMX) interface. JMX is the Java EE solution for monitoring and managing resources on a network. Like SNMP and other management standards, JMX is a public specification and many vendors of commonly used monitoring products support it.
WebLogic Server provides a set of MBeans that you can use to configure, monitor, and manage WebLogic Server resources through JMX. WebLogic Web Services also have their own set of MBeans that you can use to perform some Web Service administrative tasks.
There are two types of MBeans: runtime (for read-only monitoring information) and configuration (for configuring the Web Service after it has been deployed).
The configuration Web Services MBeans are:
- WebserviceSecurityConfigurationMBean
- WebserviceCredentialProviderMBean
- WebserviceSecurityMBean
- WebserviceSecurityTokenMBean
- WebserviceTimestampMBean
- WebserviceTokenHandlerMBean
The runtime Web Services MBeans are:
- WseeRuntimeMBean
- WseeHandlerRuntimeMBean
- WseePortRuntimeMBean
- WseeOperationRuntimeMBean
- WseePolicyRuntimeMBean
For more information on JMX, see the WebLogic Server MBean Reference and the following sections in Developing Custom Management Utilities With JMX:
- Understanding WebLogic Server MBeans
- Accessing WebLogic Server MBeans with JMX
- Managing a Domain's Configuration with JMX
Using the Java EE Deployment API
In Java EE 5, the J2EE Application Deployment specification (JSR-88) defines a standard API that you can use to configure an application for deployment to a target application server environment.
The specification describes the Java EE Deployment architecture, which in turn defines the contracts that enable tools or application programmers to configure and deploy applications on any Java EE platform product. The contracts define a uniform model between tools and Java EE platform products for application deployment configuration and deployment. The Deployment architecture makes it easier to deploy applications: Deployers do not have to learn all the features of many different Java EE deployment tools in order to deploy an application on many different Java EE platform products.
See Deploying Applications to WebLogic Server for more information.
Using Work Managers to Prioritize Web Services Work and Reduce Stuck Execute Threads
After a connection has been established between a client application and a Web Service, the interactions between the two are ideally smooth and quick, whereby the client makes requests and the service responds in a prompt and timely manner. Sometimes, however, a client application might take a long time to make a new request, during which the Web Service waits to respond, possibly for the life of the WebLogic Server instance; this is often referred to as a stuck execute thread. If, at any given moment, WebLogic Server has a lot of stuck execute threads, the overall performance of the server might degrade.
If a particular Web Service gets into this state fairly often, you can specify how the service prioritizes the execution of its work by configuring a Work Manager and applying it to the service. For example, you can configure a response time request class (a specific type of Work Manager component) that specifies a response time goal for the Web Service.
The following shows an example of how to define a response time request class in a deployment descriptor:
<work-manager>
<name>responsetime_workmanager</name>
<response-time-request-class>
<name>my_response_time</name>
<goal-ms>2000</goal-ms>
</response-time-request-class>
</work-manager>You can configure the response time request class using the Administration Console, as described in “Work Manager: Response Time: Configuration” in the Administration Console Online Help.
For more information about Work Managers in general and how to configure them for your Web Service, see “Using Work Managers to Optimize Scheduled Work” in Configuring WebLogic Server Environments.