| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "./dtd/document-v12.dtd"> |
| <document> |
| <header> |
| <title>WebServices - Axis</title> |
| </header> |
| <body> |
| <section> |
| <title>WebServices - Axis - Caching Early Draft</title> |
| <p> |
| <TABLE border="0" WIDTH="100%" cellspacing="80"> |
| <TR> |
| <TD ALIGN="CENTER"> |
| <H1> |
| Draft Proposal of<br/> |
| Caching Mechanism for Axis<br/> |
| as a JAX-RPC runtime system<br/> |
| </H1> |
| </TD> |
| </TR> |
| <TR> |
| <TD ALIGN="CENTER"> |
| <H2> |
| Early draft 2<br/> |
| 25 Aug, 2003 |
| </H2> |
| </TD> |
| </TR> |
| <TR> |
| <TD ALIGN="CENTER"> |
| <H2> |
| Toshiyuki Kimura<br/> |
| Apache Axis Committer<br/> |
| toshi@apache.org |
| </H2> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <hr/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT" id="page2">- Page 2 -</TD></TR> |
| </TABLE> |
| <H2>Table of Contents</H2> |
| <P> |
| <TABLE BORDER="0" cellspacing="20"> |
| <TR> |
| <TD> |
| <a href="#section1">1. INTRODUCTION</a><br/> |
| <a href="#section1.1">1.1 DESIGN GOALS</a><br/> |
| <a href="#section1.2">1.2 ACKNOWLEDGMENTS</a><br/> |
| <a href="#section1.3">1.3 STATUS</a><br/> |
| <a href="#section1.4">1.4 NOTATIONAL CONVENTIONS</a><br/> |
| <a href="#section2">2. CACHING MECHANISM USECASE</a><br/> |
| <a href="#section2.1">2.1 WEATHER FORECAST SERVICE</a><br/> |
| <a href="#section2.1.1">2.1.1 Service Description</a><br/> |
| <a href="#section2.1.2">2.1.2 Service Use</a><br/> |
| <a href="#section2.2">2.2 CACHING MECHANISMS</a><br/> |
| <a href="#section2.2.1">2.2.1 Service Client</a><br/> |
| <a href="#section2.2.2">2.2.2 Server Side</a><br/> |
| <a href="#section3">3. REQUIREMENTS</a><br/> |
| <a href="#section4">4. REFERENCE</a><br/> |
| <a href="#section5">5. APPENDIX: PROTOTYPE OF CACHING MECHANISM</a><br/> |
| <a href="#section6">6. APPENDIX: SAMPLE APPLICATION</a><br/> |
| <a href="#section7">7. APPENDIX: UNRESOLVED ISSUES</a><br/> |
| </TD> |
| <TD> |
| <a href="#page3">------ 3<br/></a> |
| <a href="#page3">------ 3<br/></a> |
| <a href="#page3">------ 3<br/></a> |
| <a href="#page3">------ 3<br/></a> |
| <a href="#page3">------ 3<br/></a> |
| <a href="#page4">------ 4<br/></a> |
| <a href="#page4">------ 4<br/></a> |
| <a href="#page4">------ 4<br/></a> |
| <a href="#page5">------ 5<br/></a> |
| <a href="#page5">------ 5<br/></a> |
| <a href="#page5">------ 5<br/></a> |
| <a href="#page6">------ 6<br/></a> |
| <a href="#page7">------ 7<br/></a> |
| <a href="#page7">------ 7<br/></a> |
| <a href="#page8">------ 8<br/></a> |
| <a href="#page8">------ 8<br/></a> |
| <a href="#page9">------ 9<br/></a> |
| </TD> |
| </TR> |
| </TABLE> |
| </P> |
| <HR id="page3"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 3 -</TD></TR> |
| </TABLE> |
| <H1 id="section1">1. Introduction</H1> |
| <DIV> |
| <p> |
| At the present time, SOAP is actually famous as a transport-independent protocol. But in fact, |
| HTTP protocol is the leading binding of SOAP implementations. In addition, a lot of JAX-RPC |
| implementations use the HTTP POST method for invoking Web Services based on SOAP 1.1 |
| specification. The HTTP POST method is specified in HTTP 1.0 specification (RFC 1945) as |
| uncacheable. Because of this, SOAP is also uncacheable in the present situation.</p> |
| <p> |
| This document proposes a set of APIs for JAX-RPC and Messaging styles to enable the cache |
| control mechanism in various SOAP implementations. |
| </p> |
| </DIV> |
| |
| <H2 id="section1.1">1.1 Design Goals</H2> |
| <DIV> |
| The goals of this document are as follows:<br/> |
| <UL> |
| <LI>Specify APIs for supporting Caching Mechanism for both Server side and Client side on the |
| Java platform. Caching Mechanism includes 'Enable/Disable Cache', 'Validate Cache', |
| 'Reload Control', and 'Invalidate Cached Data'.</LI> |
| <LI>Define protocol-bindings independent of Caching Mechanism for SOAP Messages</LI> |
| <LI>Support both HTTP POST method and HTTP GET method as cacheable protocol bindings |
| for SOAP Messaging</LI> |
| <LI>Support interoperability across heterogeneous platforms and environments</LI> |
| <LI>Support conformance and interoperability requirements that are testable for an |
| implementation of this proposal</LI> |
| </UL> |
| |
| <H2 id="section1.2">1.2 Acknowledgments</H2> |
| Satoshi Koyama, Takayuki Nagakura, Kenji Suzuki, and Masashi Takeichi (all from NTT DATA |
| corporation and its business partners) have provided precious technical input to this document. |
| |
| <H2 id="section1.3">1.3 Status</H2> |
| This document is the early draft version of the proposal. |
| |
| <H2 id="section1.4">1.4 Notational Conventions</H2> |
| <UL> |
| <LI>Diagrams follow the standard UML notation</LI> |
| <LI>Code snippets are not shown in complete form. Refer to the Java docs for complete and |
| detailed description.</LI> |
| <LI>Examples are illustrative (non-prescriptive)</LI> |
| </UL> |
| </DIV> |
| |
| <HR id="page4"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 4 -</TD></TR> |
| </TABLE> |
| <H1 id="section2">2. Caching Mechanism Usecase</H1> |
| This chapter describes use cases for the Cashing model in a non-prescriptive manner. Later |
| chapters of this document specify requirements and APIs in a prescriptive manner. |
| |
| <H2 id="section2.1">2.1 Weather Forecast Service</H2> |
| <DIV> |
| The following description uses a weather forecast service example to illustrate Caching |
| Mechanism concepts. |
| </DIV> |
| |
| <DIV ALIGN="CENTER"> |
| <img src="images/image2-1.gif"/> |
| </DIV> |
| |
| <H2 id="section2.1.1">2.1.1 Service Description</H2> |
| <DIV> |
| The WeatherForecastService endpoint defines and implements the following Java interface. |
| </DIV> |
| <B>Code Example: Interface of WeatherForecastService</B> |
| <BLOCKQUOTE> |
| package com.example;<br/> |
| public interface WeatherForecastProvider extends java.rmi.Remote {<br/> |
| int getChanceOfRain ( String areaSymbol ) throws java.rmi.RemoteException;<br/> |
| // ...<br/> |
| }<br/> |
| </BLOCKQUOTE> |
| The WeatherForecastService has the following features to note: |
| <UL> |
| <LI>It returns a chance of rain for the specified area.</LI> |
| <LI>It forecasts chance of rain from observation data which is provided every 3 hours.</LI> |
| <LI>The chance of rain won't be changed until the next update of observation data, even though |
| a client has frequently access to the service.</LI> |
| </UL> |
| |
| <hr/> |
| <TABLE WIDTH="100%" id="page5"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 5 -</TD></TR> |
| </TABLE> |
| <H2 id="section2.1.2">2.1.2 Service Use</H2> |
| <DIV> |
| A service client uses a JAX-RPC service by invoking remote methods on a service endpoint. |
| The following diagram shows how a service client uses JAX-RPC runtime and Caching |
| Mechanism. |
| </DIV> |
| |
| <DIV ALIGN="CENTER"> |
| <img src="images/image2-1-2.gif"/> |
| </DIV> |
| |
| <H2 id="section2.2">2.2 Caching Mechanisms</H2> |
| <DIV> |
| This section describes an overview of Caching Mechanisms. |
| </DIV> |
| |
| <H2 id="section2.2.1">2.2.1 Service Client</H2> |
| <DIV> |
| The following use case diagram shows how a client-side JAX-RPC runtime system uses local |
| cached data which is stored by Caching Mechanisms. |
| </DIV> |
| |
| <DIV ALIGN="CENTER"> |
| <img src="images/image2-2-1.gif"/> |
| </DIV> |
| |
| <HR id="page6"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 6 -</TD></TR> |
| </TABLE> |
| <H2 id="section2.2.2">2.2.2 Server Side</H2> |
| <DIV> |
| The diagram shows how a server-side JAX-RPC runtime system informs that a response |
| message is cacheable to the service client. |
| </DIV> |
| |
| <DIV ALIGN="CENTER"> |
| <img src="images/image2-2-2.gif"/> |
| </DIV> |
| |
| <HR id="page7"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 7 -</TD></TR> |
| </TABLE> |
| <H1 id="section3">3. Requirements</H1> |
| <DIV> |
| This chapter specifies the proposed scope and requirements for the 1.0 version of Caching |
| Mechanisms. These requirements will be described in more depth in the later chapters. |
| </DIV> |
| |
| <B>R01 Protocol Bindings</B> |
| <UL> |
| The goal of this document is to enable support for multiple protocol bindings. SOAP 1.1 |
| specification [1] provides a sample for using SOAP in HTTP protocol [4] with HTTP POST |
| methods. An extended version, SOAP 1.2 [2] adds a scenario by using HTTP GET methods. |
| <B>Note:</B> HTTP 1.0 [3] does not allow caching for HTTP POST methods, however HTTP 1.1 adds |
| some additional rules to enable caching mechanisms for HTTP POST methods. |
| </UL> |
| |
| <B>R02 Transport</B> |
| <UL> |
| As a minimum this caching mechanism is required to support HTTP 1.1 as the transport for |
| SOAP message. HTTP binding for the SOAP message is based on the SOAP 1.1 specification |
| [1]. |
| </UL> |
| |
| <H1 id="section4">4. Reference</H1> |
| <UL> |
| <LI>[1] W3C Note: SOAP 1.1: <link href="http://www.w3c.org./TR/SOAP/">http://www.w3c.org./TR/SOAP/</link></LI> |
| <LI>[2] W3C: SOAP 1.2: <link href="http://www.w3c.org/TR/soap12/">http://www.w3c.org/TR/soap12/</link></LI> |
| <LI>[3] HTTP 1.0 <link href="http://www.w3.org/Protocols/rfc1945/rfc1945">http://www.w3.org/Protocols/rfc1945/rfc1945</link></LI> |
| <LI>[4] HTTP 1.1: <link href="http://www.w3.org/Protocols/rfc2616/rfc2616">http://www.w3.org/Protocols/rfc2616/rfc2616</link></LI> |
| </UL> |
| |
| <HR id="page8"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 8 -</TD></TR> |
| </TABLE> |
| <H1 id="section5">5. Appendix: Prototype of Caching mechanism</H1> |
| <DIV> |
| In order to demonstrate the feasibility of Caching Mechanisms, I made a prototype of a cache |
| controller which provides a local cache on the service client side. |
| </DIV> |
| |
| <DIV ALIGN="CENTER"> |
| <img src="images/image5.gif"/> |
| </DIV> |
| |
| <DIV> |
| The hatched areas indicate the extended modules for Apache Axis as a typical JAX-RPC |
| implementation. The detail of this implementation (i.e. class diagram, sequence diagram, and |
| Java docs) will be provided after translation and review. |
| </DIV> |
| |
| <H1 id="section6">6. Appendix: Sample Application</H1> |
| <DIV> |
| This sample application uses the WeatherForecastService to enable a cacheable scenario. When |
| an end-user sets a location (like as Tokyo, Osaka, or Kyoto) and invokes the service, the |
| system returns chance of rains for the specified area. Additionally, if the request is cached data |
| and the cache is still valid data, the response message will be picked up from the cache |
| repository. |
| </DIV> |
| |
| <DIV ALIGN="CENTER"> |
| <img src="images/image6.gif"/> |
| </DIV> |
| |
| <DIV> |
| <B>Note:</B> The role of the HTTP Header Handler is to set a HTTP protocol header for cache controls. |
| </DIV> |
| |
| <HR id="page9"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 9 -</TD></TR> |
| </TABLE> |
| <H1 id="section7">7. Appendix: Unresolved issues</H1> |
| <DIV> |
| The following items are to be determined. |
| </DIV> |
| |
| <TABLE BORDER="1" WIDTH="90%" ALIGN="CENTER"> |
| <TR ALIGN="CENTER"> |
| <TH>ID</TH><TH>Name</TH><TH>Detail (actual state)</TH> |
| </TR> |
| <TR> |
| <TD>1</TD><TD>Dynamic cache-control API</TD><TD>The current version only provides static configurations with |
| server-config.wsdd.</TD> |
| </TR> |
| <TR> |
| <TD>2</TD><TD>SwA (SOAP Messages with Attachments)</TD><TD>The current version doesn't support caching a response which |
| has attachment parts.</TD> |
| </TR> |
| <TR> |
| <TD>3</TD><TD>Protocol-bindings independent Caching Mechanism</TD><TD>The current version is a prototype for HTTP bindings. To |
| create a protocol-bindings independent Caching Mechanism, |
| the following needs to be done; |
| <UL> |
| <LI> Specify a standard SOAP Message header to cache</LI> |
| <LI> Implement a SOAP Message setter on server side</LI> |
| <LI> Implement a SOAP Message parser on client side</LI> |
| </UL></TD> |
| </TR> |
| </TABLE> |
| |
| <HR id="page10"/> |
| <TABLE WIDTH="100%"> |
| <TR><TD ALIGN="RIGHT">Copyright © 2003 Toshiyuki Kimura</TD></TR> |
| <TR><TD ALIGN="LEFT">- Page 10 -</TD></TR> |
| </TABLE> |
| <TABLE BORDER="0" WIDTH="100%" CELLSPACING="100"> |
| <TR><TD></TD></TR> |
| <TR><TD> |
| <BLOCKQUATE> |
| Sun, Sun Microsystems, and Java are trademarks or registered trademarks of |
| Sun Microsystems, Inc. All other product names mentioned herein are |
| trademarks of their respective owners. |
| </BLOCKQUATE> |
| </TD></TR> |
| </TABLE> |
| </p> |
| </section> |
| </body> |
| </document> |