Course Catalog
Curriculum Guides
  .NET
  Java/J2EE
  XML
Downloads
Buy Courseware
Customization
News
Authors
Technical Library
FAQ
About Object Innovations
Opportunities
Contact Us
Home

 

 

   
www.objectinnovations.com
info@objectinnovations.com
877-558-7246 (toll free)  
781-466-8012  

570.  Developing Web Services with WebLogic(TM)

Rev. 8.1.1

 

This course is now available directly from our partner, Capstone Courseware.

This one-week course prepares Java programmers to develop Web services and clients using the BEA WebLogic Platform(TM), in accordance with prevailing standards such as SOAP, WSDL, and JAX-RPC.  Students get an overview of the interoperable and Java-specific Web services architectures, and then learn the standard (J2EE 1.4) APIs for SOAP messaging and WSDL-driven, component-based service development, working extensively with the BEA WebLogic Server to implement, deploy and test Web services.  Both document-style and RPC-style messages and services are covered in depth.

 

The first three chapters provide an overview of the world of Java-based Web services, along with an introduction to the tools available for Web-service development in WebLogic.   In these early chapters, students build and run Web services that have already been developed, focusing not on coding but on runtime behavior, SOAP traffic, and WSDL definitions.  That is, the early focus is on architecture:  the roles that various protocols, APIs, tools, and application components play in a working Web service and/or client.

 

Students then develop an understanding of the Simple Object Access Protocol (SOAP) 1.1, and skills in using the SOAP with Attachments API for Java (SAAJ) 1.1 to build SOAP-based Web services and clients.  Students will learn to read SOAP and to write it by hand, and then will proceed to use SAAJ to develop services that respond to SOAP/HTTP messages.

 

The course then turns to its main focus, which is the Java API for XML-Based RPC, or JAX-RPC.  JAX-RPC abstracts almost all the details of SOAP messaging using WSDL as a description language for interface and implementation;  this allows the Java developer to concentrate on application and service specifics.  JAX-RPC specifies service development either from WSDL documents as a starting point or beginning with Java code and generating the WSDL for client use;  this course addresses both possible development paths and analyzes their relative advantages.

 

Students learn various intermediate and advanced JAX-RPC features under WebLogic in the final chapters of the course:  developing services as EJBs; managing SOAP headers using JAX-RPC message handlers; creating and reading SOAP attachments; asynchronous SOAP messaging using JMS;  and Web-service security.

 

Versions Supported: This course runs on WebLogic 8.1. A separate version of this course is also available for WebLogic 7.0.  The content varies slightly—see the 7.0 outline.

 

LEARNING OBJECTIVES

 

·         Describe the interoperable Web services architecture (SOAP, WSDL, and UDDI).

·         Describe the Java Web services architecture, and identify the Java APIs that relate to key Web-service protocols (SAAJ, JAX-RPC, JAXR).

·         Identify the major Web services tools in the BEA WebLogic Platform, and implement simple services using both:  the Workshop and the Server.

·         Know the structure and grammar of SOAP, and read and write SOAP messages.

·         Understand the role of the SOAP header in extending messaging capabilities and semantics, for instance for routing, security or transaction support.

·         Use SAAJ to manage SOAP message content as a graph of Java objects.

·         Implement low-level Web services using SAAJ.

·         Understand the role of WSDL in providing type information for Web services.

·         Write WSDL descriptors to describe messages, interfaces and services.

·         Understand the role of JAX-RPC in the Java Web services architecture, and the mapping of WSDL and XML Schema to Java classes and components.

·         Discuss the advantages of the two alternative paths for JAX-RPC development – working from implementation language to WSDL or from WSDL to implementation.

·         Analyze Java domain models and identify the useful JAX-RPC mappings.

·         Build a Web service based on an existing Web application.

·         Build a Web service based on an existing WSDL descriptor.

·         Build a Web-service client based on a WSDL descriptor.

·         Describe the relationship between the EJB 2.1 and JAX-RPC 1.0 specifications, and how EJBs can implement Web-service endpoints.

·         Build a Web service based on an existing EJB application.

·         Describe the use of the JAX-RPC message context in reading and managing SOAP headers.

·         Implement a JAX-RPC message handler chain to adapt an existing Web service.

·         Create, send, receive, and read SOAP attachments using SAAJ.

·         Implement asynchronous Web services using JMS and JAX-RPC.

·         Understand the security issues for Web services and the range of techniques available to secure Java code and SOAP message content.

·         Secure an existing Web service by requiring authentication and authorization at the service URI.

·         Implement JAX-RPC message handlers to add encryption/decryption of SOAP message content to an existing Web service.

 

Duration:  5 days.

 

Prerequisites:

 

·         Experience in Java Programming, including object-oriented Java and the Java streams model is essential.

·         Some understanding of XML and XML Schema will be helpful, but is not strictly necessary.

 

1.      The Web Services Architecture

Evolution of Web Services

Motivation for Web Services

HTTP and XML

Interoperability Stacks

The Wire Stack

Simple Object Access Protocol (SOAP)

The Description Stack

Web Service Description Language (WSDL)

The Discovery Stack

Universal Description, Discovery and Integration (UDDI)

Hosting Web Services:  Scenarios

Observing SOAP Traffic

 

2.      WebLogic and Web Services

The WebLogic Platform

Web Services Features and Support

BEA-Speak for Web Services

The WebLogic Workshop

Limitations of the Workshop

The WebLogic Server

Creating a Domain

Ant Tasks for Web Services

Development Process

 

3.      WebLogic and Web Services

Java and Web Services

Web Services and the J2EE

WebLogic Support for Standard APIs

The Java API for XML Processing (JAXP)

The Java API for XML Binding (JAXB)

The SOAP With Attachments API for Java (SAAJ)

The Java API for XML Messaging (JAXM)

Low-Level Web Services in WebLogic (SAAJ)

The Java API for XML-Based RPC (JAX-RPC)

High-Level Web Services in WebLogic ( JAX-RPC)

WSDL-to-Java vs. Java-to-WSDL

The Java API for XML Registries (JAXR)

WebLogic UDDI

 

4.      The Simple Object Access Protocol (SOAP)

SOAP Messaging Model

SOAP Namespaces

SOAP over HTTP

The SOAP Envelope

The Message Header

The Message Body

SOAP Faults

Attachments

XML Schema

Validating Message Content

The SOAP “Section 5” Encoding

Arrays

Avoiding Redundant Serialization

 

5.      The Java APIs for SOAP Messaging (SAAJ)

The SAAJ Object Model

Parsing a SOAP Message

Reading Message Content

Bridges to JAXP

Working with Namespaces

Creating a Message

Setting Message Content

WebLogic SAAJ:  Bugs and Limitations

 

6.      SAAJ Web Services

JAXM vs. WebLogic JMS

Messaging Scenarios

Point-to-Point Messaging

SAAJ Services using JAX-RPC

Creating a JAXM Connection

Sending a Message

 


7.      Web Services Description Language (WSDL)

Web Services as Component-Based Software

The Need for an IDL

Web Services Description Language

WSDL Description Model

The Abstract Model – Service Semantics

Message Description

Messaging Styles

The Concrete Model – Ports, Services, Locations

Extending WSDL – Bindings

SOAP Style and Use Attributes

Service Description

 

8.      The Java API for XML-Based RPC (JAX-RPC)

The Java Web Services Architecture

Two Paths

How It Works - Build Time and Runtime

Mapping Between WSDL/XML and Java

Generating from WSDL

What Gets Generated

What the Application Sees

Generating from Java

Which Way to Go?

Passing Objects

Another CORBA?

 

9.      Generating Web Services from Java Code

The Java-to-XML Mapping

Primitive Types and Standard Classes

Value Types and JavaBeans

The Java-to-WSDL Mapping

Service Endpoint Interface

Scope of Code Generation

Inheritance Support

WebLogic JAX-RPC:  Bugs and Limitations

Multi-Tier Application Design

Analyzing the Domain

High-Level Ant Tasks

web-services.xml

When Things Don't Fit

Polymorphism

Extensible Type Mapping

 

10. Generating Java Web Services from WSDL

The XML-to-Java Mapping

Simple and Complex Types

Enumerations

Arrays

WebLogic Extended Mappings

The WSDL-to-Java Mapping

Mapping Operation Inputs and Outputs

Building a Service Client

Locating a Service

Client-Side Validation

Interoperability under Java-to-WSDL

Creating a Web Service

Mid-Level Ant Tasks

XML and WSDL Design Guidelines

Deploying the Service

Interoperability under WSDL-to-Java

Controlling Names and URIs

 

11. Web Services and EJB

Enterprise JavaBeans

Three Tiers for J2EE

EJB 2.1 and JAX-RPC

Session Beans as Web Service Endpoints

How It Works – Build Time and Runtime

The Bean's Service Endpoint Interface

SOAP as an RMI Transport

Adding a SOAP Interface to a Session Bean

Generating From WSDL

"Gotchas"

 

12. Message Context and Message Handlers

Handling SOAP Headers

Servlet Endpoint Context

EJB Endpoint Context

Using SAAJ

JAX-RPC Message Handlers

Handler Chains

Processing Model and Patterns

The <handlerChain> Ant Task

 

 

13. SOAP Attachments

WebLogic Support for Attachments

SAAJ Object Model, Revisited

The SOAPMessage Class

MIME

The Java Activation Framework

The MimeHeaders Class

The AttachmentPart Class

Adding SOAP Attachments

Identifying Attachments

Reading Attachments

 

14. Web Services and JMS

Asynchronous Messaging

The Java Message Service

Queues and Topics

Message Types

Message-Driven Beans

Asynchronous Web Services

Message Queues as Web Services

Ant Tasks and JMS Services

 

15. Security

Web Services and Security

Threats

Technology and Techniques

Public Key Encryption

Digital Signature

J2EE Techniques

Securing Web-Service URIs

HTTPS

XML and SOAP Solutions

XML Encryption and Signature

WS-Security

SAML

XACML

WebLogic Support for WS-Security

Securing a Service’s Messages

Key Pairs and Keystores

Enhancing the Client

 

Learning Resources

Developer’s Quick Reference

 

System Requirements

 

Hardware – minimal:                     Pentium 500MHz, 256 meg RAM, 500 meg HD.

Hardware – recommended:           Pentium 1.5gHz, 512 meg RAM, 1 gig HD.

Operating system:                          Tested on Windows 2000 Professional. 

Software:                                       All free downloadable tools