This tutorial explains how to develop web applications using the Web Services Interoperability Technologies (WSIT). The tutorial describes how, when, and why to use the WSIT technologies and also describes the features and options that each technology supports.
WSIT, developed by Sun Microsystems, implements several new web services technologies including WS-Security, WS-Trust, WS-SecureConversation, WS-ReliableMessaging, WS-AtomicTransactions, Data Binding, and Optimization. WSIT was also tested in a joint effort by Sun Microsystems, Inc. and Microsoft with the expressed goal of ensuring interoperability between web services applications developed using either WSIT and the Windows Communication Foundation (WCF) product.
This tutorial addresses the following technology areas:
Bootstrapping and Configuration
Message Optimization
Reliable Messaging (WS-RM)
Web Services Security 1.1 (WS-Security)
Web Services Trust (WS-Trust)
Web Services Secure Conversation (WS-Secure Conversation)
Data Contracts
Atomic Transactions (WS-AT)
This preface contains information about and conventions for the entire Sun JavaTM System Application Server documentation set.
This tutorial is intended for programmers who are interested in developing and deploying Java based clients and service providers that can interoperate with Microsoft .NET 3.0 clients and service providers.
Before proceeding with this tutorial, you should have a good knowledge of the Java programming language. A good way to get to that point is to work through The Java Tutorial, Fourth Edition, Sharon Zakhour et al. (Addison-Wesley, 2006). You should also be familiar with the Java DataBase Connectivity (JDBCTM) and relational database features described in JDBC API Tutorial and Reference, Third Edition, Maydene Fisher et al. (Addison-Wesley, 2003).
The tutorial consists of the following chapters:
Chapter 1, About The Examples describes the software needed to run the tutorial examples.
Chapter 2, Introduction to WSIT introduces WSIT, highlights the features of each WSIT technology, describes the standards that WSIT implements for each technology, and provides high-level descriptions of how each technology works.
Chapter 3, WSIT Example Using a Web Container and NetBeans IDE provides instructions for creating, deploying, and testing Web service providers and clients using NetBeans IDE.
Chapter 4, Bootstrapping and Configuration describes how to create a WSIT client from a Web Service Description Language (WSDL) file.
Chapter 5, Message Optimization describes how to configure web service providers and clients to use message optimization.
Chapter 6, Using Reliable Messaging describes how to configure web service providers and clients to use reliable messaging.
Chapter 7, Using WSIT Security describes how to use the NetBeans IDE to configure web service providers and clients to use web services security.
Chapter 9, WSIT Example Using a Web Container Without NetBeans IDE provides code examples and instructions for creating, deploying, and testing web service providers and clients using either of the supported web containers.
Chapter 10, Accessing WSIT Services Using WCF Clients describes how to build and run a Microsoft Windows Communication Foundation (WCF) client that accesses the addnumbers service described in Chapter Table 8–1.
Chapter 11, Data Contracts describes the best practices for production and consumption of data contracts for interoperability between WCF web services and Java web service clients or Java web services and WCF web service clients.
Chapter 12, Using Atomic Transactions describes Atomic Transactions.
Please send comments, broken link reports, errors, suggestions, and questions about this tutorial to the tutorial team at users@wsit.dev.java.net .
The Application Server documentation set describes deployment planning and system installation. The Uniform Resource Locator (URL) for Application Server documentation is http://docs.sun.com/coll/1343.4. For an introduction to Application Server, refer to the books in the order in which they are listed in the following table.
Table P–1 Books in the Application Server Documentation Set
Book Title |
Description |
---|---|
Documentation Center |
Application Server documentation topics organized by task and subject. |
Release Notes |
Late-breaking information about the software and the documentation. Includes a comprehensive, table-based summary of the supported hardware, operating system, Java Development Kit (JDKTM), and database drivers. |
Quick Start Guide |
How to get started with the Application Server product. |
Installation Guide |
Installing the software and its components. |
Deployment Planning Guide |
Evaluating your system needs and enterprise to ensure that you deploy the Application Server in a manner that best suits your site. General issues and concerns that you must be aware of when deploying the server are also discussed. |
Application Deployment Guide |
Deployment of applications and application components to the Application Server. Includes information about deployment descriptors. |
Developer’s Guide |
Creating and implementing Java Platform, Enterprise Edition (Java EE platform) applications intended to run on the Application Server that follow the open Java standards model for Java EE components and APIs. Includes information about developer tools, security, debugging, and creating lifecycle modules. |
Java EE 5 Tutorial |
Using Java EE 5 platform technologies and APIs to develop Java EE applications. |
Java WSIT Tutorial |
Developing web applications using the Web Service Interoperability Technologies (WSIT). Describes how, when, and why to use the WSIT technologies and the features and options that each technology supports. |
Administration Guide |
System administration for the Application Server, including configuration, monitoring, security, resource management, and web services management. |
High Availability Administration Guide |
Post-installation configuration and administration instructions for the high-availability database. |
Administration Reference |
Editing the Application Server configuration file, domain.xml. |
Upgrade and Migration Guide |
Upgrading from an older version of Application Server or migrating Java EE applications from competitive application servers. This guide also describes differences between adjacent product releases and configuration options that can result in incompatibility with the product specifications. |
Performance Tuning Guide |
Tuning the Application Server to improve performance. |
Troubleshooting Guide |
Solving Application Server problems. |
Error Message Reference |
Solving Application Server error messages. |
Reference Manual |
Utility commands available with the Application Server; written in man page style. Includes the asadmin command line interface. |
Application Server can be purchased by itself or as a component of Sun Java Enterprise System (Java ES), a software infrastructure that supports enterprise applications distributed across a network or Internet environment. If you purchased Application Server as a component of Java ES, you should be familiar with the system documentation at http://docs.sun.com/coll/1286.3. The URL for all documentation about Java ES and its components is http://docs.sun.com/prod/entsys.5.
For documentation about other stand-alone Sun Java System server products, go to the following:
A JavadocTM tool reference for packages provided with the Application Server is located at http://glassfish.dev.java.net/nonav/javaee5/api/index.html. Additionally, the following resources might be useful:
For information on creating enterprise applications in the NetBeansTM Integrated Development Environment (IDE), see http://www.netbeans.org/kb/55/index.html.
For information about the Java DB database included with the Application Server, see http://developers.sun.com/javadb/.
The GlassFish Samples project is a collection of sample applications that demonstrate a broad range of Java EE technologies. The GlassFish Samples are bundled with the Java EE Software Development Kit (SDK), and are also available from the GlassFish Samples project page at https://glassfish-samples.dev.java.net/.
The following table describes the default paths and file names that are used in this book.
Table P–2 Default Paths and File Names
Placeholder |
Description |
Default Value |
---|---|---|
tut-install |
Represents the base installation directory for the WSIT Tutorial. |
None. Install the tutorial in a directory without spaces in the path. |
java-home |
Represents the base installation directory for the Java Platform, Standard Edition (Java SE platform). |
None. Same value as the JAVA_HOME environment variable. |
netbeans-install |
Represents the base installation directory for NetBeans IDE. |
None. |
as-install |
Represents the base installation directory for the Application Server or the Software Development Kit (SDK) of which the Application Server is a part. |
Java ES installations on the SolarisTM operating system: /opt/SUNWappserver/appserver Java ES installations on the Linux operating system: /opt/sun/appserver/ Other Solaris and Linux non-SDK installations, non-root user: user’s-home-directory/SUNWappserver Other Solaris and Linux non-SDK installations, root user: /opt/SUNWappserver Solaris and Linux SDK installations: user’s-home-directory/SDK Windows, all non-SDK installations: SystemDrive:\Sun\AppServer Windows, all SDK installations: SystemDrive:\Sun\SDK |
domain-root-dir |
Represents the directory containing all Application Server domains. |
Java ES Solaris installations: /var/opt/SUNWappserver/domains/ Java ES Linux installations: /var/opt/sun/appserver/domains/ All other installations: as-install/domains/ |
domain-dir |
Represents the directory for a domain. In configuration files, you might see domain-dir represented as follows: ${com.sun.aas.instanceRoot} |
domain-root-dir/domain-dir |
instance-dir |
Represents the directory for a server instance. |
domain-dir/instance-dir |
The following table describes the typographic changes that are used in this book.
Table P–3 Typographic Conventions
Typeface |
Meaning |
Example |
---|---|---|
AaBbCc123 |
The names of commands, files, and directories, and onscreen computer output |
Edit your .login file. Use ls -a to list all files. machine_name% you have mail. |
AaBbCc123 |
What you type, contrasted with onscreen computer output |
machine_name% su Password: |
AaBbCc123 |
A placeholder to be replaced with a real name or value |
The command to remove a file is rm filename. |
AaBbCc123 |
Book titles, new terms, and terms to be emphasized (note that some emphasized items appear bold online) |
Read Chapter 6 in the User's Guide. A cache is a copy that is stored locally. Do not save the file. |
The following table explains symbols that might be used in this book.
Table P–4 Symbol Conventions
Symbol |
Description |
Example |
Meaning |
---|---|---|---|
[ ] |
Contains optional arguments and command options. |
ls [-l] |
The -l option is not required. |
{ | } |
Contains a set of choices for a required command option. |
-d {y|n} |
The -d option requires that you use either the y argument or the n argument. |
${ } |
Indicates a variable reference. |
${com.sun.javaRoot} |
References the value of the com.sun.javaRoot variable. |
- |
Joins simultaneous multiple keystrokes. |
Control-A |
Press the Control key while you press the A key. |
+ |
Joins consecutive multiple keystrokes. |
Ctrl+A+N |
Press the Control key, release it, and then press the subsequent keys. |
-> |
Indicates menu item selection in a graphical user interface. |
File -> New -> Templates |
From the File menu, choose New. From the New submenu, choose Templates. |
The Sun web site provides information about the following additional resources:
Besides searching Sun product documentation from the docs.sun.comSM web site, you can use a search engine by typing the following syntax in the search field:
search-term site:docs.sun.com |
For example, to search for “broker,” type the following:
broker site:docs.sun.com |
To include other Sun web sites in your search (for example, java.sun.com, www.sun.com, and developers.sun.com), use sun.com in place of docs.sun.com in the search field.
Third-party URLs are referenced in this document and provide additional, related information.
Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods, or services that are available on or through such sites or resources.
Sun is interested in improving its documentation and welcomes your comments and suggestions. To share your comments, go to http://docs.sun.com and click Send Comments. In the online form, provide the full document title and part number. The part number is a 7-digit or 9-digit number that can be found on the book's title page or in the document's URL. For example, the part number of this book is 819-3669.