Java Web Services
Developer Pack v1.3
Zhongnan Shen
12/04/2003
Outlines
What is WSDP?
What’s in WSDP?
An Example
The Coffee Break Application
Resources
What is WSDP
A free integrated toolkit used to build
and test XML applications, Web
services, and Web applications with
the latest Web service technologies
and standards implementations ;
Supports WS-I Basic Profile 1.0;
Can be downloaded at
/> size:26M; platform: windows, unix
What’s in WSDP
Java Architecture for XML Binding (JAXB) v1.0.2;
Java API for XML Processing (JAXP) v1.2.4;
Java API for XML-based RPC (JAX-RPC) v1.1;
SOAP with Attachments API for Java (SAAJ) v1.2;
Java API for XML Registries (JAXR) v1.0.5;
JavaServer Faces (JSF) v1.0 EA4;
JavaServer Pages Standard Tag Library (JSTL) v1.1 EA;
XML and Web Services Security v1.0 EA2;
Java WSDP Registry Server v1.0_06;
Ant Build Tool 1.5.4;
Apache Tomcat v5 development container;
Ws-I Supply Chain Management Sample Application 1.0;
What’s in WSDP
Java Architecture for XML Binding (JAXB)
Providing API and tools for automating the
mapping between XML documents and Java
objects;
Compiling an XML schema into one or more Java
technology classes;
The following operations can be performed:
unmarshal XML content into a Java representation;
access, update and validate the Java
representation against schema constraint;
marshal the Java representation of the XML content
into XML content.
What’s in WSDP
Java Architecture for XML Binding (JAXB)
XML Schema Java Class Files
<xsd:element name="purchaseOrder"
type="PurchaseOrderType"/>
PurchaseOrder.
java
<xsd:element name="comment" type="xsd:string"/> Comment.java
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
PurchaseOrder
Type.java
What’s in WSDP
Java API for XML Processing (JAXP)
supports processing of XML documents using
DOM, SAX, and XSLT;
Document Object Model (DOM): an application
programming interface for HTML and XML
documents;
Simple API for XML (SAX): a common interface
implemented for many different XML parsers;
XSL Transformations (XSLT): a language for
transforming XML documents into other XML
documents;
supports for XML schema and an XSLT
compiler (XSLTC);
What’s in WSDP
Java API for XML-Based RPC (JAX-RPC)
an API for building Web services and clients that use
remote procedure calls (RPC) and XML ;
an easy-to-develop programming model for
development of SOAP based web services, including
web service clients and endpoints;
developers are not exposed to the complexity of SOAP
protocol level mechanisms;
support for WSDL->Java and Java->WSDL mapping;
support for SOAP message processing model;
support for document based messaging;
support HTTP level session management and SSL
based security mechanisms.
What’s in WSDP
Java API for XML-Based RPC (JAX-RPC)
What’s in WSDP
SOAP with Attachments API for Java (SAAJ)
enables developers to produce and consume
messages conforming to the SOAP 1.1
specification and SOAP with Attachments note;
derived from the package originally defined in
the JAXM 1.0 specification;
SOAP messages can contain both XML contents
and non-XML contents (as attachments);
Messages sent using the SAAJ API are called
request-response messages;