Document Scope and Audience

This document is a resource for software developers who develop WebLogic Web Services. It also contains information that is useful for business analysts and system architects who are evaluating WebLogic Server or considering the use of WebLogic Web Services for a particular application.

The topics in this document are relevant during the design and development phases of a software project. The document also includes topics that are useful in solving application problems that are discovered during test and pre-production phases of a project.

This document does not address production phase administration, monitoring, or performance tuning Web Service topics. For links to WebLogic Server® documentation and resources for these topics, see Related Documentation.

It is assumed that the reader is familiar with J2EE and Web Services concepts, the Java programming language, and Web technologies. This document emphasizes the value-added features provided by WebLogic Web Services and key information about how to use WebLogic Server features and facilities to get a WebLogic Web Service application up and running.

Guide to This Document

Understanding WebLogic Web Services, provides an overview of how WebLogic Web Services are implemented, why they are useful, and the standard specifications that they implement or to which they conform.

Common Web Services Use Cases and Examples, provides a set of common use case and examples of programming WebLogic Web Services, along with step by step instructions on reproducing the example in your own environment.

Programming the JWS File, provides details about using JWS annotations in a Java file to implement a basic Web Service. The section discusses both standard (JSR-181) JWS annotations as well as WebLogic-specific ones.

Data Types and Data Binding, discusses the built-in and user-defined XML Schema and Java data types that are supported by WebLogic Web Services.

Invoking Web Services,describes how to write a client application (stand-alone or inside a WebLogic Web Service) that invokes a Web Service using the JAX-RPC stubs generated by the WebLogic Web Service Ant task clientgen.

Administering Web Services, provides information about the types of administrative tasks you typically perform with WebLogic Web Services and the different ways you can go about administering them: Administration Console, WebLogic Scripting Tool, and so on.

Security Policy Assertion Reference, provides reference information about the policy assertions you can add to a WS-Policy file to configure the message-level (digital signatures and encryption) security of a WebLogic Web Service.

Samples for the Web Services Developer

In addition to this document, BEA Systems provides a variety of code samples for Web Services developers. The examples and tutorials illustrate WebLogic Web Services in action, and provide practical instructions on how to perform key Web Service development tasks.

BEA recommends that you run some or all of the Web Service examples before programming your own application that use Web Services.

Downloading Examples Described in this Guide

Many of the samples described in this guide are available for download from the dev2dev CodeShare site. Each example is self-contained and requires only that you install WebLogic Server, create a domain, and start a server instance. All needed files, such as the JWS file that implements the sample Web Service, the Java client to invoke the Web Service, and the Ant build.xml file to build, deploy, and run the example are included in the ZIP file.

Avitek Medical Records Application (MedRec) and Tutorials

MedRec is an end-to-end sample J2EE application shipped with WebLogic Server that simulates an independent, centralized medical record management system. The MedRec application provides a framework for patients, doctors, and administrators to manage patient data using a variety of different clients.

MedRec demonstrates WebLogic Server and J2EE features, and highlights BEA-recommended best practices. MedRec is included in the WebLogic Server distribution, and can be accessed from the Start menu on Windows machines. For Linux and other platforms, you can start MedRec from the WL_HOME\samples\domains\medrec directory, where WL_HOME is the top-level installation directory for WebLogic Server.

As companion documentation to the MedRec application, BEA provides development tutorials that provide step-by-step procedures for key development tasks, including Web Service-specific tasks. See Application Examples and Tutorials for the latest information.

Web Services Examples in the WebLogic Server Distribution

WebLogic Server optionally installs API code examples in WL_HOME\samples\server\examples\src\examples\webservices, where WL_HOME is the top-level directory of your WebLogic Server installation. You can start the examples server, and obtain information about the samples and how to run them from the WebLogic Server Start menu.

Additional Web Services Examples Available for Download

Additional API examples for download can be found at http://dev2dev.bea.com. These examples include BEA-certified ones, as well as examples submitted by fellow developers.

Release-Specific WebLogic Web Services Information

For release-specific information, see these sections in WebLogic Server Release Notes:

Differences Between 8.1 and 9.X WebLogic Web Services

Web Services is one of the most important themes of J2EE 1.4, and thus of WebLogic Server 9.X. J2EE 1.4 introduces a standard Java component model for authoring Web Services with the inclusion of new specifications such as Implementing Enterprise Web Services (JSR-921) and Java API for XML Registries (JAX-R), as well as the updated JAX-RPC and SAAJ specifications. Because the implementation of Web Services is now a J2EE standard, there have been many changes between 8.1 and 9.X WebLogic Web Services.

In particular, the programming model used to create WebLogic Web Services has changed to take advantage of the powerful new metadata annotations feature introduced in Version 5.0 of the JDK. In 9.X you use JWS metadata annotations to annotate a Java file with information that specifies the shape and behavior of the Web Service. These JWS annotations include both the standard ones defined by the Web Services Metadata for the Java Platform specification (JSR-181
), as well as additional WebLogic-specific ones. This JWS-based programming model is similar to that of WebLogic Workshop 8.1, although in 8.1 the metadata was specified via Javadoc tags. The WebLogic Web Services programming model in 8.1, by contrast, used the many attributes of the Web Service Ant tasks, such as servicegen, to specify the shape and behavior of the Web Service. Occasionally programmers had to update the deployment descriptor file (webservices.xml) manually to specify characteristics of the Web Service. The new programming model makes implementing Web Services much easier and quicker.

Additionally, the runtime environment upon which WebLogic Web Services 9.X run has been completely rewritten to support the Implementing Enterprise Web Services, Version 1.1 (JSR-921), specification. This means that Web Services created in 9.X are internally implemented differently from those created in 8.1 and both run in completely different runtime environments. The 8.1 runtime environment has been deprecated, although it will continue to be supported for a limited number of future WebLogic Server releases. This means that even though 8.1 WebLogic Web Services run correctly on WebLogic Server 9.X, this may not always be true and BEA recommends that you upgrade the 8.1 Web Services to run in the 9.X runtime environment.

Asynchronous, loosely-coupled Web Services that take advantage of the following features, either separately or all together: Web Service reliable messaging, conversations, buffering, asynchronous request-response, and JMS transport.