You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by aj...@apache.org on 2005/11/01 13:08:38 UTC

svn commit: r330037 - in /webservices/axis2/trunk/java/xdocs/adb: adb-codegen-integration.html adb-howto.html adb-tweaking.html

Author: ajith
Date: Tue Nov  1 04:08:28 2005
New Revision: 330037

URL: http://svn.apache.org/viewcvs?rev=330037&view=rev
Log:
1. Updated the ADB-Howto document. It's almost complete if not for the image
2. Added adb-tweaking.html. Not complete yet
3. Added adb-codegen-integration.html. Not complete yet 

Added:
    webservices/axis2/trunk/java/xdocs/adb/adb-codegen-integration.html
    webservices/axis2/trunk/java/xdocs/adb/adb-tweaking.html
Modified:
    webservices/axis2/trunk/java/xdocs/adb/adb-howto.html

Added: webservices/axis2/trunk/java/xdocs/adb/adb-codegen-integration.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/adb/adb-codegen-integration.html?rev=330037&view=auto
==============================================================================
--- webservices/axis2/trunk/java/xdocs/adb/adb-codegen-integration.html (added)
+++ webservices/axis2/trunk/java/xdocs/adb/adb-codegen-integration.html Tue Nov  1 04:08:28 2005
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h1> This is the ADB Integration guide. Sadly It's not complete yet!  </h1>
+
+</body>
+</html>

Modified: webservices/axis2/trunk/java/xdocs/adb/adb-howto.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/adb/adb-howto.html?rev=330037&r1=330036&r2=330037&view=diff
==============================================================================
--- webservices/axis2/trunk/java/xdocs/adb/adb-howto.html (original)
+++ webservices/axis2/trunk/java/xdocs/adb/adb-howto.html Tue Nov  1 04:08:28 2005
@@ -3,6 +3,9 @@
   <meta http-equiv="content-type" content="">
   <meta content="">
   <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
   <title>ADB  - Howto</title>
 </head>
 
@@ -140,13 +143,13 @@
 <pre>&lt;schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:tns="http://soapinterop.org/types" targetNamespace="http://soapinterop.org/types"&gt;
 &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
-&lt;complexType name="SOAPStruct"&gt;
-&lt;sequence&gt;
-&lt;element name="varString" type="xsd:string"/&gt;
-&lt;element name="varInt" type="xsd:int"/&gt;
-&lt;element name="varFloat" type="xsd:float"/&gt;
-&lt;/sequence&gt;
-&lt;/complexType&gt;
+ &lt;complexType name="SOAPStruct"&gt;
+  &lt;sequence&gt;
+   &lt;element name="varString" type="xsd:string"/&gt;
+   &lt;element name="varInt" type="xsd:int"/&gt;
+   &lt;element name="varFloat" type="xsd:float"/&gt;
+  &lt;/sequence&gt;
+ &lt;/complexType&gt;
 &lt;element name="myElement" type="tns:SOAPStruct"/&gt;
 &lt;/schema&gt;</pre>
 
@@ -203,12 +206,45 @@
 
 <h3>An Example!</h3>
 
-<p>Consider the follwing XML fragment
+<p>Consider the follwing XML fragment</p>
 <pre>&lt;myElement&gt;
   &lt;varInt&gt;5&lt;/varInt&gt;
   &lt;varString&gt;Hello&lt;/varString&gt;
   &lt;varFloat&gt;3.3&lt;/varFloat&gt;
-&lt;/myElement&gt;</pre></p>
-<p>Enthusiastic readers might already have figured out that this  </p>
+&lt;/myElement&gt;</pre>
+
+<p>Enthusiastic readers might already have figured out that this piece of XML
+complies to the Schema mentioned above. The following piece of code shows how
+to build a populated instance of myElement with this fragment of XML</p>
+
+<p></p>
+<pre>XMLStreamReader reader = XMLInputFactory.newInstance().
+                                createXMLStreamReader(
+                                        new ByteArrayInputStream(xmlString.getBytes()));
+myElement elt = myElement.parse(reader);</pre>
+
+<p>Although this example takes on the tedious effort of creating a reader out
+of the String, inside the Axis2 environment an XMLStreamReader can be
+direclty asked from the OMElement! Hence the parse method becomes a hugh
+advantage for hassle free object creation.</p>
+
+<p>Similarly the reader obtained from the object can also be utilized as
+needed. The following code fragment shows how to utilize the getPullParser
+method to create an OMElement</p>
+
+<p></p>
+<pre>XMLStreamReader reader = elt.getPullParser(null);
+OMElement omElt =  new StAXOMBuilder(reader).getDocumentElement();</pre>
+
+<p>That's all to it! If you are interested in learning more on ADB the
+following documents may also be helpful</p>
+
+<p></p>
+<ul>
+  <li><a href="adb-tweaking.html">Tweaking the ADB code generator</a></li>
+  <li><a href="adb-codegen-integration.html">ADB and Axis2
+  Integration</a></li>
+</ul>
+<hr>
 </body>
 </html>

Added: webservices/axis2/trunk/java/xdocs/adb/adb-tweaking.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/adb/adb-tweaking.html?rev=330037&view=auto
==============================================================================
--- webservices/axis2/trunk/java/xdocs/adb/adb-tweaking.html (added)
+++ webservices/axis2/trunk/java/xdocs/adb/adb-tweaking.html Tue Nov  1 04:08:28 2005
@@ -0,0 +1,5 @@
+<body>
+<h1> This is the ADB Tweaking guide. Sadly It's not complete yet!  </h1>
+
+</body>
+</html>