About This Tutorial

Who Should Use This Tutorial

Prerequisites

How to Use This Tutorial

About the Examples

Required Software

Building the Examples

Further Information

How to Print This Tutorial

Typographical Conventions

Feedback

Chapter 1:   Binding XML Schema to Java Classes with JAXB

JAXB Architecture

Architectural Overview

The JAXB Binding Process

JAXB Binding Framework

More About javax.xml.bind

More About Unmarshalling

More About Marshalling

More About Validation

XML Schemas

Representing XML Content

Binding XML Names to Java Identifiers

Java Representation of XML Schema

Binding XML Schemas

Simple Type Definitions

Default Data Type Bindings

Default Binding Rules Summary

Customizing JAXB Bindings

Scope

Scope Inheritance

What is Not Supported

JAXB APIs and Tools

Chapter 2:   Using JAXB

General Usage Instructions

Description

Using the Examples

Configuring and Running the Samples

JAXB Compiler Options

About the Schema-to-Java Bindings

Schema-Derived JAXB Classes

Basic Examples

Unmarshal Read Example

Modify Marshal Example

Create Marshal Example

Unmarshal Validate Example

Validate-On-Demand Example

Customizing JAXB Bindings

Why Customize?

Customization Overview

Customize Inline Example

Datatype Converter Example

External Customize Example

Fix Collides Example

Bind Choice Example

Chapter 3:   Streaming API for XML

Why StAX?

Streaming Versus DOM

Pull Parsing Versus Push Parsing

StAX Use Cases

Comparing StAX to Other JAXP APIs

StAX API

Cursor API

Iterator API

Choosing Between Cursor and Iterator APIs

Using StAX

StAX Factory Classes

Resources, Namespaces, and Errors

Reading XML Streams

Writing XML Streams

Sun's Streaming Parser Implementation

SJSXP JAR Files

Reporting CDATA Events

SJSXP Factories Implementation

Sample Code

Configuring Your Environment for Running the Samples

Running the Samples

Sample XML Document

CursorParse.java

CursorApproachEventObject.java

EventParse.java

CursorWriter.java

MyStreamFilter.java

EventProducerConsumer.java

Further Information

Chapter 4:   Introduction to XML and Web Services Security

Overview

Does XWS-Security Implement Any Specifications?

On Which Technologies Is XWS-Security Based?

Interoperability with Other Web Services

What is the XWS-Security Framework?

Configuring Security Configuration Files

Understanding Security Configuration Files

XWS-Security Configuration File Schema

Semantics of Security Configuration File Elements

How Do I Specify the Security Configuration for the Build Files?

Are There Any Sample Applications Demonstrating XWS-Security?

Writing SecurityEnvironmentHandlers

Using the SubjectAccessor API

Useful XWS-Security Command-Line Tools

pkcs12import

keyexport

wscompile

Troubleshooting XWS-Security Applications

Further Information

Chapter 5:   Understanding and Running the XWS-Security Sample Applications

Setting Up To Use XWS-Security With the Sample Applications

Setting System Properties

Configuring a JCE Provider

Setting Up the Application Server For the Examples

Setting Build Properties

Simple Security Configurations Sample Application

Plugging in Security Configurations

Simple Sample Security Configuration Files

Running the Simple Sample Application

JAAS Sample Application

JAAS Sample Security Configuration Files

Setting Up For the JAAS-Sample

Running the JAAS-Sample Application

XWS-Security APIs Sample Application

The XWSSProcessor Interface

API-Sample Client Code

The API Sample Security Configuration Files

Building and Running the API Sample Application

Soap With Attachments Sample Application

The SwA Interop Scenarios

SwA Sample Configuration Files

Running the SwA Sample Application

SAML Sample Application

SAML Interop Scenarios

SAML Interop Sample Configuration Files

Running the SAML Interop Sample

Dynamic Policy Sample Application

Security Configuration Files for Enabling Dynamic Policy

Setting Security Policies at Runtime

Running the Dynamic Policy Sample Application

Dynamic Response Sample Application

Security Configuration Files for Enabling Dynamic Response

Using the CallbackHandler to Enable Dynamic Response

Running the Dynamic Response Sample Application

Further Information

Chapter 6:   Java XML Digital Signature API

How XWS-Security and XML Digital Signature API Are Related

XML Security Stack

Package Hierarchy

Service Providers

Introduction to XML Signatures

Example of an XML Signature

XML Digital Signature API Examples

validate Example

genenveloped Example

Chapter 7:   Using the Service Registry Web Console

Getting Started With the Web Console

Starting the Web Console

Changing the Default Language

Searching the Registry

Using the Search Menu

Selecting a Query

Searching by Object Type

Searching by Name and Description

Searching by Classification

Viewing Search Results

Viewing Object Details

Using the Explore Menu

Publishing and Managing Registry Objects

Publishing Objects

Adding a Classification to an Object

Adding an External Identifier to an Object

Adding an External Link to an Object

Adding Custom Information to an Object Using Slots

Adding a Postal Address to an Organization or User

Adding a Telephone Number to an Organization or User

Adding an Email Address to an Organization or User

Adding a User to an Organization

Adding a Child Organization to an Organization

Adding a Service Binding to a Service

Adding a Specification Link to a Service Binding

Adding a Child Concept to a Classification Scheme or Concept

Changing the State of Objects

Removing Objects

Creating Relationships Between Objects

Chapter 8:   Developing Clients for the Service Registry

Overview of JAXR

About Registries and Repositories

About JAXR

JAXR Architecture

About the Examples

Setting Up a JAXR Client

Starting the Registry

Getting Access to the Registry

Establishing a Connection to the Registry

Obtaining and Using a RegistryService Object

Querying a Registry

Basic Query Methods

JAXR Information Model Interfaces

Finding Objects by Name

Finding Objects by Type

Finding Objects by Classification

Finding Objects by External Identifier

Finding Objects by External Link

Finding Objects by Unique Identifier

Finding Objects You Published

Retrieving Information About an Object

Using Declarative Queries

Using Iterative Queries

Invoking Stored Queries

Querying a Registry Federation

Publishing Objects to the Registry

Creating Objects

Saving Objects in the Registry

Managing Objects in the Registry

Creating Relationships Between Objects: Associations

Storing Items in the Repository

Organizing Objects Within Registry Packages

Changing the State of Objects in the Registry

Removing Objects From the Registry and Repository

Further Information

Chapter 9:   Administering the Service Registry

About the Admin Tool

Starting the Admin Tool

Batch Mode

Interactive Mode

Admin Tool Command-line Options

Using the Admin Tool

Permissions

Displaying Exceptions

Identifying Registry Objects

The Effect of Locale on Specifying Names

Case Sensitivity

Using Admin Tool Commands

add association

add user

cd

chown

cp

echo

help

lcd

ls

pwd

quit

rm

select

set

show

users

Other Administration Tasks

Backing Up and Restoring the Database

Appendix A:   A XWS-Security Formal Schema Definition

Formal Schema Definition

Appendix B:   SJSXP JAR Files

sjsxp.jar

jsr173_api.jar

Index