You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mirae-dev@ws.apache.org by jk...@apache.org on 2005/02/09 13:38:38 UTC
svn commit: r153059 - in webservices/mirae/trunk/docs:
WSDL2WS_J2MEarchi.html architecture-guide.html building-mirae.html
developers-guide.html index.html install.html mirae.css reading.html
to-do.html user-guide.html
Author: jkumaran
Date: Wed Feb 9 04:38:36 2005
New Revision: 153059
URL: http://svn.apache.org/viewcvs?view=rev&rev=153059
Log:
documentation review
Added:
webservices/mirae/trunk/docs/WSDL2WS_J2MEarchi.html (with props)
webservices/mirae/trunk/docs/architecture-guide.html (with props)
webservices/mirae/trunk/docs/building-mirae.html (with props)
webservices/mirae/trunk/docs/developers-guide.html (with props)
webservices/mirae/trunk/docs/index.html (with props)
webservices/mirae/trunk/docs/install.html (with props)
webservices/mirae/trunk/docs/mirae.css (with props)
webservices/mirae/trunk/docs/reading.html (with props)
webservices/mirae/trunk/docs/to-do.html (with props)
webservices/mirae/trunk/docs/user-guide.html (with props)
Added: webservices/mirae/trunk/docs/WSDL2WS_J2MEarchi.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/WSDL2WS_J2MEarchi.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/WSDL2WS_J2MEarchi.html (added)
+++ webservices/mirae/trunk/docs/WSDL2WS_J2MEarchi.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,95 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE Documentation</title>
+ <link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>WSDL2WS_J2ME Architecture Guide</h1>
+
+<p><strong><font size="+2">Contents</font></strong></p>
+<ul>
+ <li> <a href="#Introduction">Introduction</a></li>
+ <li> <a href="#Functionality">Functionality</a></li>
+ <li> <a href="#Architecture">Architecture</a></li>
+</ul>
+
+<h2><a NAME="Introduction"></a>Introduction</h2>
+<p>WSDL2WS_J2ME is a tool for generating stubs and appropriate wrappers for MIRAE.</p>
+
+<h2><a NAME="Functionality"></a>Functionality</h2>
+<p><strong><em>Functionality of the tool</em></strong></p>
+<p>Tool generate Wrapper for custom types in following conditions</p>
+<p>Generate the method signatures of the types (serialize(), desirealize()) so
+ that developer can write serialize desirialize code in most efficient way. </p>
+<p>Generate the complete wrapper for WSDL types like struts </p>
+<p>Generate the complete wrappers for Array of any simple or WSDL types like struts
+</p>
+<p><strong><em>Types of classes generated by the tool</em></strong></p>
+<ul>
+ <li><strong>Stub class</strong> -which has the methods which are described in
+ the WSDL file. Within the method the actual logic to call the remote respected
+ method is implemented.</li>
+ <li><strong>Parameter classes</strong> -for each custom type in the WSDL document
+ together with desirealize and seriealize logics. </li>
+</ul>
+<p> <br>
+ <strong><em>Style of the service </em></strong></p>
+<p> The tool currently supports RPC encoder and doc literal.<br>
+ <br>
+ <strong><em>Supports for making simple custom types</em></strong></p>
+<p> Tool generate Wrapper for custom types in following conditions,</p>
+<ul>
+ <li> Generate the complete wrapper for WSDL types like struts.</li>
+ <li> Generate the complete wrappers for Array of any simple or WSDL types like
+ struts </li>
+</ul>
+<p><em><strong>Supported Schema types</strong></em> </p>
+<ul>
+ <li>all </li>
+ <li>Sequence </li>
+ <li>Element </li>
+ <li>Simple types <br>
+ </li>
+</ul>
+<h2><a NAME="Architecture"></a>Architecture</h2>
+<p><em>Architecture Diagram</em></p>
+<p><img src="images/wsdl2ws_j2me_architecture_html_1b2aad78.gif" width="554" height="157"></p>
+<p>The tool takes a top down approach. It starts with a wsdl document and generates
+ all the classes necessary to deploy the web service. </p>
+<p><strong><em>Mediator WsContext</em></strong></p>
+<p> The WSDL file and the user options are processed by the WSDL2WS_J2ME. The WSDL create
+ a class called wsContext(WebServiceContext) which is the runtime representation
+ of the processed data. This wsContext passes to the generators. The generators
+ extract the information form the wsContext create the files.The wsContext act
+ as a mediator and create a loosely coupled system.</p>
+<p>wsContext has following componets.</p>
+<ul>
+ <li>ServiceInfo – information about service </li>
+ <li>WrapperInfo – information about wrapper options </li>
+ <li>TypeMap – information about custom types </li>
+</ul>
+<p><strong><em>Generator</em></strong></p>
+<p>Generator generate a class depend on the options, It contains a class called
+ SourceWriter and the concrete implementation of the SourceWriter decides what
+ will Genarator generate. The SourceWriter factory create a correct type of generator
+ depend on the options.</p>
+<p><strong><em>Flow of execution</em></strong></p>
+<p>WSDL file and user options are processed by the WSDL2WS_J2ME and WSContext object
+ is created. </p>
+<p>WebServiceGenaratorFactory will create WebServiceGenarator depend on the service
+ style </p>
+<p>then the WebServiceGenarator will create right set of Generators to create
+ the set of files </p>
+<p>Each generator will invoke SourceWriter capable of writing each type of file.
+ <br>
+</p>
+<p> </p>
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/WSDL2WS_J2MEarchi.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/architecture-guide.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/architecture-guide.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/architecture-guide.html (added)
+++ webservices/mirae/trunk/docs/architecture-guide.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,92 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE Documentation</title>
+ <link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>Architecture Guide</h1>
+
+<p><strong><font size="+2">Contents</font></strong></p>
+<ul>
+ <li> <a href="#Introduction">Introduction</a></li>
+ <li> <a href="#Modules">Modules</a></li>
+ <li> <a href="#Architecture">Architecture</a></li>
+</ul>
+
+<h2><a NAME="Introduction"></a>Introduction</h2>
+<p>Mirae is a Web services sub-project to implement JSR 172. JSR 172 provides
+ support for accessing Web services on the J2ME platform. It will deliver two
+ new features to the J2ME platform: </p>
+<p>1) Accessing SOAP based remote Web services from the J2ME platform. </p>
+<p>2) Giving XML parsing support to the J2ME platform. </p>
+<p>ABOUT THE NAME: "Mirae" (pronounced 'mee re' (as in 'red')) means
+ future in Korean. Also the Japanese word for future is "Mirai" ..
+ which is nearly the same. .</p>
+<h2><a NAME="Modules"></a>Modules</h2>
+<p>There are three important modules in MIRAE following,</p>
+<ol>
+ <li> JAXRPC (Web Service API) implementation</li>
+ <li>JAXP (SAX Parser) Implementation</li>
+ <li>WSDL2WS_J2ME Tool to gernerate the required stubs</li>
+</ol>
+<p> </p>
+<h2><a NAME="Architecture"></a>Architecture</h2>
+<p><strong><em>Architecture Diagram</em></strong></p>
+<p></p>
+<p><img src="images/architecture_guide_html_m274ff02d.gif" width="512" height="133"></p>
+<p><br>
+ WSDL2WS_J2ME tool generates client side stub classes which has invocation code.
+ This invocation code is invoked by the mobile application to invoke the MIRAE
+ API. MIRAE API provides the mean for serializing the soap request using the
+ parameters passed from the mobile application via the stub and deserializing
+ the soap request.</p>
+<p><br>
+ MIRAE is a combination of two separate indipendent deliverables, such as JAXRPC
+ and JAXP.</p>
+<p> JAXRPC provides access to web services from J2ME platform. It perform serialization
+ of SOAP request.</p>
+<p> JAXP is a SAX parser implementation which provide xml parsing capability to
+ the J2ME platform. It deserializes the SOAP response received from the server.</p>
+<p><strong><em>Class Diagram</em></strong></p>
+<p><img src="images/classdiagram.png" width="469" height="431"></p>
+<p></p>
+<ol>
+ <li> First the Call class gets the inputparameters to invoke the remote procedures
+ defined in the webservice.</li>
+ <li>The Encoder class provides the mean for serialize the SOAP request.</li>
+ <li>The Decoder class Calls SAXParser class's parse method to parse the received
+ SOAP response.</li>
+ <li>SAXParser propagate the parsed response into the Decoder class. </li>
+ <li>Finally the result is sent to the stub by the Call class.</li>
+</ol>
+<p></p>
+<p><strong><em>Web Service Invocation</em></strong></p>
+<p></p>
+<p><img src="images/architecture_guide_html_741ceaf.png" width="570" height="565"></p>
+<ol>
+ <li> The Mobile application calls the operations defined in the stub class.</li>
+ <li>The stub class set the parameters and invoke JAXRPC api.</li>
+ <li>JAXRPC api serializes the SOAP request.</li>
+ <li>When the SOAP response from the server is received, JAXP is invoked by the
+ JAXRPC to parse the SOAP response.</li>
+ <li>While parsinfg the response message, the response is propagated to the JAXRPC.</li>
+ <li>Then the output parameter is propagated to the stub.</li>
+ <li>Then the mobile application gets the processed result.</li>
+</ol>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p><br>
+</p>
+<p></p>
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/architecture-guide.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/building-mirae.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/building-mirae.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/building-mirae.html (added)
+++ webservices/mirae/trunk/docs/building-mirae.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,57 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE Documentation</title>
+ <link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>Build Guide</h1>
+
+<p><strong><font size="+2">Contents</font></strong></p>
+<ul>
+ <li> <a href="#Introduction">Introduction</a></li>
+ <li> <a href="#Environment">Environment</a></li>
+ <li> <a href="#Necessary Downloads">Necessary Downloads</a></li>
+ <li> <a href="#Building MIRAE">Buildeing MIRAE</a></li>
+</ul>
+
+<h2><a NAME="Introduction"></a>Introduction</h2>
+<p>This document guides you how to build the MIRAE.</p>
+<h2><a NAME="Environment"></a>Environment</h2>
+<p><strong>Preferred versions</strong></p>
+<ul>
+ <li> JDK Version - 1.4.2 + </li>
+ <li> Ant Version - 1.6 </li>
+ <li>WTK2.1</li>
+</ul>
+<h2><a NAME="Necessary Downloads"></a>Necessary Downloads</h2>
+<p>(i) Download WTK2.1 (Go to url http://java.sun.com/products/j2mewtoolkit/index.html)
+ and install.</p>
+<p>(ii)Download tomcat(if you have not) from http://jakarta.apache.org/tomcat/
+ and install tomcat.</p>
+<p>(iii)install ant(download from http://ant.apache.org/) and install it.<br>
+ Then copy the junit.jar(from mirae-home/lib) and antenna-bin-0.9.13.jar (from
+ http://antenna.sourceforge.net/) to ant-home/lib<br>
+</p>
+<h2><a NAME="Building MIRAE"></a>Building MIRAE</h2>
+<p>Go to MIRAE_HOME and change the system.properties file according to your configurations.</p>
+<p>version=mirae-1.0<br>
+ j2me-home=/home/jeyakumaran/programs/j2me/WTK2.1<br>
+ tomcat-home=/home/jeyakumaran/programs/tomcat/jakarta-tomcat-4.1.29<br>
+ mirae.home=/home/jeyakumaran/work/projects/mirae<br>
+ ant_home=/home/jeyakumaran/programs/java/ant/apache-ant-1.6.1<br>
+ build.debug=true<br>
+ wtk.home=${j2me-home}<br>
+ tomcat-start=startup.sh<br>
+ tomcat-stop=shutdown.sh</p>
+<p>c)run ant test (All the test cases will be running with the environment set
+ ups)</p>
+<p> </p>
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/building-mirae.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/developers-guide.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/developers-guide.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/developers-guide.html (added)
+++ webservices/mirae/trunk/docs/developers-guide.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,19 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE Documentation</title>
+ <link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>Developer's Guide</h1>
+
+<p>Sorry the page is still in under construction.</p>
+<p><a href="index.html">BACT TO HOME</a></p>
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/developers-guide.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/index.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/index.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/index.html (added)
+++ webservices/mirae/trunk/docs/index.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,34 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE Documentation</title>
+ <link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>Documentation</h1>
+
+<p>This is the documentation for <a href="http://ws.apache.org/mirae/">MIRAE</a>.
+</p>
+<h2>Documentation for MIRAE Users</h2>
+<ul>
+ <li> <a href="user-guide.html">User's Guide</a></li>
+ <li> <a href="reading.html">Further Reading</a></li>
+</ul>
+
+<h2>Documentation for MIRAE Developers</h2>
+<ul>
+ <li> <a href="building-mirae.html">Building MIARE</a> </li>
+ <li> <a href="architecture-guide.html">Architecture Guide</a></li>
+ <li> <a href="WSDL2WS_J2MEarchi.html">WSDL2WS_J2ME tool architecture</a></li>
+ <li> <a href="developers-guide.html">Developer's Guide</a> </li>
+ <li><a href="to-do.html">TODO</a></li>
+</ul>
+
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/index.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/install.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/install.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/install.html (added)
+++ webservices/mirae/trunk/docs/install.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body>
+The page is under construction
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/install.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/mirae.css
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/mirae.css?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/mirae.css (added)
+++ webservices/mirae/trunk/docs/mirae.css Wed Feb 9 04:38:36 2005
@@ -0,0 +1,55 @@
+.example {
+ background:#ccccff
+}
+
+.xml {
+ background:#eeeeee
+}
+
+.java {
+ background:#eeeeee
+}
+
+body {
+ background-color:#FFFFFF;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ margin-left: 40px;
+ color:#000000
+}
+
+h2 {
+ text-decoration: underline;
+ background-color: #DCE1FF;
+ background-position: left;
+ margin-left: -30px}
+
+h3 {
+ margin-left: -10px
+}
+
+h1 {
+ margin-left: -30px
+}
+
+.note {
+ font-weight:bold;
+}
+
+.head {
+ font-weight:bold;
+ font-size: 240%;
+ text-align: center;
+}
+
+td.section {
+ background-color: #82ADF6;
+ font-size: 180%;
+ text-align: center;
+ font-weight: bold;
+}
+
+small.red {
+ color: red
+}
+
+
Propchange: webservices/mirae/trunk/docs/mirae.css
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/reading.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/reading.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/reading.html (added)
+++ webservices/mirae/trunk/docs/reading.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,17 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE: further reading</title>
+<link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>Recommended Reading</h1>
+
+<p>Here you can get additional tutorials and sources related to MIRAE and webservices
+ .</p>
Propchange: webservices/mirae/trunk/docs/reading.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/to-do.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/to-do.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/to-do.html (added)
+++ webservices/mirae/trunk/docs/to-do.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,24 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE: further reading</title>
+<link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>TODO</h1>
+<p>1) Documentaion</p>
+<p>- Expalining the tool with more samples.</p>
+<p>- Architecture guide and User guide for Parser module</p>
+<p>- Creating MIRAE site for MIRAE in apache - In progress</p>
+<p>- Documentation for doc literal samples</p>
+<p> </p>
+<p>2) Testing</p>
+<p>- Testing with different types pf phones</p>
+<p>- Performance Analysys</p>
+
Propchange: webservices/mirae/trunk/docs/to-do.html
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/mirae/trunk/docs/user-guide.html
URL: http://svn.apache.org/viewcvs/webservices/mirae/trunk/docs/user-guide.html?view=auto&rev=153059
==============================================================================
--- webservices/mirae/trunk/docs/user-guide.html (added)
+++ webservices/mirae/trunk/docs/user-guide.html Wed Feb 9 04:38:36 2005
@@ -0,0 +1,125 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>MIRAE Documentation</title>
+ <link href="mirae.css" rel=stylesheet type=text/css>
+</head>
+<body>
+
+<center>
+ <h1> MIRAE</h1>
+</center>
+
+<h1>User's Guide</h1>
+
+<p><strong><font size="+2">Contents</font></strong></p>
+<ul>
+ <li> <a href="#Introduction">Introduction to MIRAE</a> </li>
+ <li> <a href="#Basic">Basics of Accessing Web Services</a></li>
+ <li> <a href="#stub">Building stubs and Associate classes</a></li>
+ <li> <a href="#Intergration">Intergrating the Mobile appliication with MIRAE</a></li>
+</ul>
+
+<h2><a NAME="Introduction"></a>Introduction to MIRAE</h2>
+<p>Mirae is a Web services sub-project to implement <a href="http://www.jcp.org/en/jsr/detail?id=172">JSR
+ 172</a>.</p>
+<p><a href="http://www.jcp.org/en/jsr/detail?id=172">JSR 172</a> provides support
+ for accessing Web services on the J2ME platform. It will deliver two new features
+ to the J2ME platform: </p>
+<p>1) Accessing SOAP based remote Web services from the J2ME platform. </p>
+<p>2) Giving XML parsing support to the J2ME platform. </p>
+<p><em>ABOUT THE NAME: "Mirae" (pronounced 'mee re' (as in 'red')) means
+ future in Korean. Also the Japanese word for future is "Mirai" ..
+ which is nearly the same. </em></p>
+<p>Here the Mobile application developer may able to use the XML parser for j2me
+ platform independent of other modules. In addition to that they can use the
+ web services api for developing mobile applications which contain the logics
+ of invoking remote web services.</p>
+<p>MIRAE provides WSDL2WS_J2ME tool to generate the required stub classes to invoke
+ the web services.</p>
+<p></p>
+<h2><a NAME="Basic"></a>Basics of Accessing WEB Services</h2>
+<p>Before running the samples, the user need to make sure that his CLASSPATH includes
+ the following jar files.</p>
+<p>wsdl2ws_j2me.jar</p>
+<p>axis.jar</p>
+<p>commons-discovery.jar</p>
+<p>commons-logging.jar</p>
+<p>jaxrpc.jar</p>
+<p>log4j.jar</p>
+<p>Saaj.jar</p>
+<p>Wsdl4j.jar</p>
+<p>Now let's travel through the MIRAE. First of all let's take a look at an example
+ rpc Web Service client stub that will call the addPoint method on the remote
+ web server.</p>
+<p>
+<pre class="example"><font color="#000000" face="Courier New, Courier, mono">public PointStub() throws Exception{</font></p><p>this.enduri="http://localhost:8080/axis/services/Point";</p></font><p><font color="#000000" face="Courier New, Courier, mono">this.SOAPAction = new javax.xml.namespace.QName("PointService");</font></p><p><font color="#000000" face="Courier New, Courier, mono">}</font></p><p><font color="#000000" face="Courier New, Courier, mono">public ws_mobile_point.Point addPoint(ws_mobile_point.Point
+ param0,ws_mobile_point.Point param1) throws Exception{</font></p><p><font color="#000000" face="Courier New, Courier, mono">javax.xml.namespace.QName methodName = new javax.xml.namespace.QName("urn:ws_mobile_point","addPoint");</font></p><p><font color="#000000" face="Courier New, Courier, mono">j2me.xml.rpc.Call call = new j2me.xml.rpc.Call();</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.setStyle(j2me.util.Constants.STYLE_RPC); </font></p><p><font color="#000000" face="Courier New, Courier, mono">call.setOperationName(methodName);</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.setPortTypeName(SOAPAction);</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.addParameter(param0,"param0", new javax.xml.namespace.QName("urn:ws_mobile_point","Point"));</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.addParameter(param1,"param1", new javax.xml.namespace.QName("urn:ws_mobile_point","Point"));</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.setTargetEndpointAddress(this.enduri);</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.setReturnCategory(j2me.util.Constants.TYPE_COMPLEX);</font></p><p><font color="#000000" face="Courier New, Courier, mono">call.setReturnType( new ws_mobile_point.Point());</font></p><p><font color="#000000" face="Courier New, Courier, mono">ws_mobile_point.Point res = (ws_mobile_point.Point)call.invoke();</font></p><p><font color="#000000" face="Courier New, Courier, mono">return res;</font></p><p><font color="#000000" face="Courier New, Courier, mono">}</font></pre>
+<p> </p>
+<ul>
+ <li>The target end point URI and the SOAPAction(web service name) are specified
+ in the default constructor.</li>
+ <li>Here we define the operation (method) name of the Web Service. </li>
+ <li>Call object is used to store metadata about the service to invoke. </li>
+ <li>Input parameters to invoke the remote method are added</li>
+ <li>Finally the service is invoked and the result is received.</li>
+</ul>
+<p>(Since it is a jax-rpc subset it will be easier for a developer to develop)
+</p>
+<p><br>
+</p>
+<h2><a NAME="stub"></a>Building Stubs and Associate classes for RPC</h2>
+<p>WSDL2WS_J2ME tool accepts wsdl file and generates client side stubs which provides
+</p>
+<p>the mean for accesing a specific web service defined by the wsdl file. </p>
+<p>You'll find the WSDL2WS_J2ME tool in "org.apache.mirae.wsdl2ws.WSDL2Ws".
+ The basic</p>
+<p> invocation form looks like this:</p>
+<p><pre class="example">% java org.apache.mirae.wsdl2ws.WSDL2Ws (WSDL-file-URL)<br>
+</pre></p>
+<p>This will generate those bindings necessary for the client. Here it follows
+ the JAX-RPC </p>
+<p>specification when generating Java client bindings from WSDL. For this discussion,
+</p>
+<p>assume that we use Point.wsdl and we executed the following:</p>
+<p><pre class="example">% java org.apache.mirae.wsdl2ws.WSDL2Ws Point.wsdl</pre>
+<p>The generated files will reside in the directory "ws_mobile_point"
+ which is in the genstub </p>
+<p>directory which is in the current directory. They are put here because that
+ is the target </p>
+<p>namespace from the WSDL and namespaces map to Java packages. </p>
+<p> </p>
+<p>If we specify the output directory as follows the generated files will reside
+ in the </p>
+<p>directory "ws_mobile_point" in the specified directory.</p>
+<p><pre class="example">% java org.apache.mirae.wsdl2ws.WSDL2Ws Point.wsdl -o /samples/point<br>
+</pre></p>
+There is an Ant Task to integrate this action with an Ant based build process.
+<p> </p>
+<p><em><strong>This will generate the following files</strong></em></p>
+<p>Point.java: New interface file that contains the appropriate remote usage.</p>
+<p>PointStub.java: Client side stub. </p>
+<p>(Array types): Java files will be produced for all of the other array types.
+ There are no additional files for the Point web service. </p>
+<p>Now you have all of the necessary files to build your client side code and
+ access the web service! </p>
+<p> </p>
+<h2><a NAME="Intergration"></a>Intergrating the Mobile Application with the
+ MIRAE</h2>
+<p>Let us consider the folloing Mobile application for accessing web services.</p>
+<p>public class PointClientMIDLet extends MIDlet implements CommandListener, Runnable{</p>
+<pre class="example">//.........</p>
+<p>public void commandAction(Command command, Displayable displayable) {</p><p>if(command==sendCommand){</p><p>Thread thread =new Thread(this);</p><p>thread .start(); </p><p>}</p><p>public void run(){</p><p>try{</p><p>Point p1 = new Point(20,4);</p><p>Point p2 = new Point(10,3); </p><p>PointStub stub =new PointStub(); </p><p>Point p=stub.addPoint(p1,p2); </p><p>int x=p.getX();</p><p>int y=p.getY();</p><p>}catch(Exception e){}</p><p>}</p><p>}</pre>
+<p>This mobile application is a class extended from abstract MIDLet class ant
+ it implements CommandListener and Runnable interfaces. </p>
+<p>The very important thing is that the operations defined in the generated stub
+ class should be accessed by a different thread other than the main thread. If
+ it is called by the main thread it will cause deadlock. So that the operations
+ of the stub class is accessed within the run() method.</p>
+<p>Here the user should specify the input parameters in correct format as the
+ service needs when the method is invoked.</p>
+<p>The received result may be further processed according to the need.<br>
+</p>
+</body>
+</html>
Propchange: webservices/mirae/trunk/docs/user-guide.html
------------------------------------------------------------------------------
svn:executable = *