Training » All Courses » Java » JavaEE » J2EE Web Services

Course Summary

The cross-platform nature of Java facilitates distributed applications running on multiple hardware and OS. The Web Services are a great choice for integrating applications that are written in various languages. In this three days class we will discuss Web Services Description Language (WSDL), Simple Object Access Protocol (SOAP), and XML.

During this class student will be using JAX-RPC toolkit for developing web services in Java programming language. JAX-RPC is available in the J2EE 1.4 RI. J2EE 1.4 RI will be used to build and run examples.

Duration

3 days.

Objectives

This class combines lectures with hands-on experience that will help students to understand Java Web Services.

Audience

Knowledge of Java Programming Language.

Additional Notes

Java™ and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Apache™ and Tomcat™ are a trademark of The Apache Software Foundation and are used with permission.

Outline


Introduction

  • Overview of Web Services
  • Service-Oriented Architecture
  • J2EE Web Services
  • Overview of XML
  • Overview of SOAP
  • Overview of WSDL
  • Overview of UDDI
  • The J2EE Web Service APIs - JAX-RPC
  • The J2EE Web Service APIs - SAAJ,,JAXR, JAXP
  • Benefits of Web Services

XML

  • What is XML?
  • The Main Difference Between XML and HTML
  • XML Example
  • XML and the Web.
  • Data and Document Structure
  • Well-Formed XML
  • Greating the XML File
  • Declaration
  • Comments
  • Root Element
  • Attributes
  • Nested Elements
  • Nested Elements vs. Attributes
  • Validation
  • XML DTD
  • External DOCTYPE Declaration
  • Namespaces

XML Schema

  • Schema Example
  • Assigning and Locating Schemas
  • Reference to an XML Schema
  • The <schema> Element
  • Target Namespace
  • Simple Element
  • Default and Fixed Values
  • Attributes
  • Complex Element
  • Global Element

The Java API for XML Processing (JAXP)

  • JAXP
  • Overview of SAX
  • Overview of DOM
  • SAX Parser
  • SAX Parser Example
  • Handlers
  • Parser With a Handler
  • Error Handlers
  • Exercise
  • DOM Parser
  • Error Handling
  • Example
  • DOM Nodes
  • The Document Interface
  • Creating an XML Document
  • Exercise
  • XSTL

Simple Object Access protocol

  • Architecture
  • Messages
  • Example of a SOAP Message
  • The actor Attribute
  • The Body
  • The Fault Element
  • Pre-Defined Child Elements of Fault
  • Encoding Style
  • Attachments

Web Services Definition Language

  • Introduction to WSDL
  • WSDL Documents
  • WSDL Ports
  • Binding
  • WSDL Syntax

Building Web Services with JAX-RPC

  • Why Use JAX-RPC?
  • An Overview of JAX-RPC
  • Writing a JAX-RPC Service
  • Define the Service EndPoint Interface
  • Implement the Interface
  • The Client
  • Building the Servise
  • The service-config.xml File
  • The WSDL File
  • The mapping.xml File
  • Creating Application EAR File
  • Deploytool
  • SimpleService.ear File
  • SimpleService.war File
  • Verify The EAR File
  • Deploy the EAR File into Application Server
  • The client-config.xml File
  • Generating stub
  • Compile the Client
  • Run the Client.

Implementing Session Bean as a Web Service

  • Overview
  • Endpoint Interface
  • The Bean Class
  • The Client
  • Building and Running Web Service
  • Creating the WSDL Document
  • SimpleBeanApp file
  • Web service as a Session Bean
  • Deploying Web Service
  • Run the Client

SOAP with Attachments API for Java

  • Introduction to SAAJ
  • Messages with no Attachment
  • Messages with Attachment
  • Connections
  • SOAPConnection Object
  • Creating a Message
  • Accessing Elements of a Message
  • Sending a File
  • Example - Sending a File

J2EE Security

  • Overview
  • The Security Management
  • Declarative Security
  • Programmatic Security