Java Web Services Developer Pack v1.3 - PowerPoint PPT Presentation

About This Presentation
Title:

Java Web Services Developer Pack v1.3

Description:

Apache Tomcat v5 development container; Ws-I Supply Chain Management Sample Application 1.0; ... support for document based messaging; ... – PowerPoint PPT presentation

Number of Views:94
Avg rating:3.0/5.0
Slides: 28
Provided by: digitalc3
Category:

less

Transcript and Presenter's Notes

Title: Java Web Services Developer Pack v1.3


1
Java Web Services Developer Pack v1.3
  • Zhongnan Shen
  • 12/04/2003

2
Outlines
  • What is WSDP?
  • Whats in WSDP?
  • An Example
  • The Coffee Break Application
  • Resources

3
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 http//java.sun.com/webservic
    es/downloads/webservicespack.html
  • size26M platform windows, unix

4
Whats 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

5
Whats 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.

6
Whats in WSDP
  • Java Architecture for XML Binding (JAXB)

7
Whats 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)

8
Whats 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-gtJava and Java-gtWSDL mapping
  • support for SOAP message processing model
  • support for document based messaging
  • support HTTP level session management and SSL
    based security mechanisms.

9
Whats in WSDP
  • Java API for XML-Based RPC (JAX-RPC)

10
Whats 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

11
Whats in WSDP
  • SOAP with Attachments API for Java (SAAJ)

12
Whats in WSDP
  • Java API for XML Registries (JAXR)
  • provides a uniform and standard Java API for
    accessing different kinds of XML Registries
  • ebXML Registry and Repository standard
  • Universal Description, Discovery, and Integration
    (UDDI)
  • JAXR enables Java software programmers to use a
    single, easy-to-use abstraction API to access a
    variety of XML registries. A unified JAXR
    information model describes content and metadata
    within XML registries

13
Whats in WSDP
  • Java API for XML Registries (JAXR)

14
Whats in WSDP
  • JavaServer Faces Technologies
  • a server-side user interface framework for Java
    technology-based Web applications
  • Main components include
  • A set of APIs for
  • representing UI components and managing their
    state
  • handling events and input validation
  • defining page navigation
  • supporting internationalization and accessibility
    .
  • A JavaServer Pages (JSP) custom tag library for
    expressing UI components within a JSP page.

15
Whats in WSDP
  • JavaServer Faces Technologies

16
Whats in WSDP
  • JavaServer Pages Standard Tag Library (JSTL)
  • encapsulates core functionality common to many
    JSP applications
  • ltcforEach var"item" items"sessionScope.cart.i
    tems"gt
  •   ...   
  • lttrgt     
  • lttd align"right" bgcolor"ffffff"gt
  •      item.quantity   
  • lt/tdgt   
  • ...
  • lt/cforEachgt

17
Whats in WSDP
  • JavaServer Pages Standard Tag Library (JSTL)

18
Whats in WSDP
  • XML and Web Services Security
  • Transport-Level Security
  • security is addressed by the transport layer.
  • Basic Authentication with JAX-RPC
  • Client-Certificate Authentication over HTTP/SSL
    with JAX-RPC
  • Message-Level Security
  • security information is contained within the
    SOAP message.

19
Whats in WSDP
  • Java WSDP Registry Server
  • The Java Web Services Developer Pack (Java WSDP)
    Registry Server implements Version 2 of UDDI
  • provide a UDDI registry for Web services in a
    private environment
  • use it with the Java WSDP APIs as a test registry
    for Web services application development.

20
An Example
  • The Coffee Break server obtains the
  • coffee varieties and their prices by
  • querying distributors at startup and
  • on demand.
  • The Coffee Break server uses SAAJ messaging to
    communicate with one of its distributors.
  • The Coffee Break server uses JAXR to send a query
    searching for coffee distributors that support
    JAX-RPC to the Registry Server.
  • The Coffee Break server requests price lists from
    each of the coffee distributors.
  • The Coffee Break server forwards
  • suborders to each distributor to get
  • confirmations.
  • Coffee Break Application

21
An Example-Coffee Break
  • JAX-RPC Distributor Service
  • Service side
  • Service Interface
  • public interface SupplierIF extends Remote   
  • public ConfirmationBean placeOrder(OrderBean
    order)
  •     throws RemoteException   
  • public PriceListBean getPriceList() throws
    RemoteException
  • Publishing the Service in the Registry
  • JAXRPublisher publisher new JAXRPublisher()
  • publisher.makeConnection(queryURL, publishURL)
        
  • String key publisher.executePublish(username,
    password, endpoint)

22
An Example-Coffee Break
  • JAX-RPC Distributor Service
  • Client side
  • Building the Static Stub Client
  • Clients makes remote call through a stub, a
    local object which acts as a proxy for the remote
    service.
  • wscompile -genclient -d build -classpath build
    config-wsdl.xml
  • -genclient flag instructs wscompile to generate
    the stubs
  • -d flag tells the tool to write the output to
    the build subdirectory
  • config-wsdl.xml file specifies the location of
    the WSDL file
  • Invoking the remote method
  • PriceListBean priceList PriceFetcher.getPriceLis
    t(distributor)

23
An Example-Coffee Break
  • SAAJ Distributor Service
  • SAAJ Service
  • Returning the Price List
  • public void doPost(HttpServletRequest req,
    HttpServletResponse resp)
  • Analyze the request
  • Compose the message
  • OutputStream os resp.getOutputStream()
  • reply.writeTo(os)
  •       os.flush()
  • Returning the Order Confirmation

24
An Example-Coffee Break
  • SAAJ Distributor Service
  • SAAJ Client
  • SOAPConnectionFactory scf
      SOAPConnectionFactory.newInstance()
    SOAPConnection con scf.createConnection()
  • Compose the request
  • SOAPMessage response con.call(request,
    endpoint)

25
An Example-Coffee Break
  • Coffee Break Server
  • The Coffee Break Server uses servlets, JSP
    pages, and JavaBeans components to dynamically
    construct HTML pages for consumption by a Web
    browser client.
  • RetailPriceListServlet RetailPriceList
  • The RetailPriceListServlet responds to requests
    to reload the price list
  • Component RetailPriceList
  • Discovering the JAX-RPC Service
  • JAXRQueryByName jq new JAXRQueryByName()
    connection jq.makeConnection(queryURL,
    publishURL) jq.executeQuery(queryString)
  • Query JAX-RPC service and SAAJ service
  • CheckoutFormBean
  • submits suborders to each distributor

26
Resources
  • Java Web Services Developer Pack 1.3
  • dowload
  • http//java.sun.com/webservices/downloads/webserv
    icespack.html
  • Tutorial
  • http//java.sun.com/webservices/docs/1.3/tutorial
    /doc/index.html
  • Sample Applications
  • http//java.sun.com/webservices/docs/1.3/wsi-samp
    leapp/index.html

27
Thanks for Listening
Write a Comment
User Comments (0)
About PowerShow.com