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 de...@apache.org on 2005/08/16 10:45:16 UTC

svn commit: r232961 - in /webservices/axis/trunk/java/xdocs: OMTutorial.html http-transport.html installationguide.html migration.htm migration.html navigation.xml userguide.html

Author: deepal
Date: Tue Aug 16 01:44:38 2005
New Revision: 232961

URL: http://svn.apache.org/viewcvs?rev=232961&view=rev
Log:
doc modifications

Added:
    webservices/axis/trunk/java/xdocs/migration.html
Removed:
    webservices/axis/trunk/java/xdocs/migration.htm
Modified:
    webservices/axis/trunk/java/xdocs/OMTutorial.html
    webservices/axis/trunk/java/xdocs/http-transport.html
    webservices/axis/trunk/java/xdocs/installationguide.html
    webservices/axis/trunk/java/xdocs/navigation.xml
    webservices/axis/trunk/java/xdocs/userguide.html

Modified: webservices/axis/trunk/java/xdocs/OMTutorial.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/OMTutorial.html?rev=232961&r1=232960&r2=232961&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/OMTutorial.html (original)
+++ webservices/axis/trunk/java/xdocs/OMTutorial.html Tue Aug 16 01:44:38 2005
@@ -109,8 +109,13 @@
 The interface provided by the builder is identical though the internal implementations vary. However, the types of the returned objects depend on the implementation of the builder. For example the SOAPModelBuilder returns SOAP specific objects (such as the SOAPEnvelope, which are sub classes of the OMElement) through its builder methods.
 The following piece of code shows the correct method of creating an OM document from an input stream. Note that the SOAP builder is used in this example.</p>
 
-<pre class="code">//create the parser<br>        XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file));<br>//create the builder<br>        OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMAbstractFactory.getSOAP11Factory(), parser); 
-//get the root element (in this case the envelope)<br>        SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();</pre>
+<source><pre>//create the parser<br>        
+XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file));
+<br>//create the builder<br>        
+OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMAbstractFactory.getSOAP11Factory(), parser); 
+//get the root element (in this case the envelope)<br>
+        SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
+</pre></source>
 <div align="left"><b>Code listing 2.1</b></div>
 <p>As the example shows, creating an OM from an input stream is pretty straightforward. However elements and nodes can be created programmatically to modify the structure as well.
 The recommended way to create OM objects programmatically is to use the factory. OMAbstractFactory.getOMFactory() will return the proper factory and the creator methods for each type should be called. Currently OM has two builders, namely the OM builder and the SOAP model builder. These builders provide the necessary information to the XML info set model to build itself.  </p>

Modified: webservices/axis/trunk/java/xdocs/http-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/http-transport.html?rev=232961&r1=232960&r2=232961&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/http-transport.html (original)
+++ webservices/axis/trunk/java/xdocs/http-transport.html Tue Aug 16 01:44:38 2005
@@ -10,7 +10,7 @@
 <p>This is the default transport
 sender that is being used in Server API as well as Client
 API.&nbsp;HTTP
-funtionality of the Sender is based on commons-httpclient-3.0-rc2. In
+funtionality of the Sender is based on commons-httpclient-3.0-rc3. In
 order to aquire the maxium flexibiliy, this sender has implemented POST
 interface and GET interface. This is mainly due to the fact that Axis2
 SOAP stack has the tendency to support REST based services as well. </p>

Modified: webservices/axis/trunk/java/xdocs/installationguide.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/installationguide.html?rev=232961&r1=232960&r2=232961&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/installationguide.html (original)
+++ webservices/axis/trunk/java/xdocs/installationguide.html Tue Aug 16 01:44:38 2005
@@ -5,7 +5,8 @@
 </head>
 <body>
 <h3><a name="_Toc96698081"></a>Introduction </h3>
-<p>Axis 2.0 can be downloaded as a <a href="releases.html">zipped binary </a> or the <a href="cvs-usage.html">source </a>.
+<p>Axis 2.0 can be downloaded as a <a href="releases.html">zipped binary </a> 
+or the <a href="http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/?root=Apache-SVN">source </a>.
 This section describes how Axis2 can be installed either as a
 standalone server or as part of a J2EE compliant servlet container. </p>
 

Added: webservices/axis/trunk/java/xdocs/migration.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/migration.html?rev=232961&view=auto
==============================================================================
--- webservices/axis/trunk/java/xdocs/migration.html (added)
+++ webservices/axis/trunk/java/xdocs/migration.html Tue Aug 16 01:44:38 2005
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+  <title>Migrating from Axis 1.x</title>
+</head>
+<body>
+<h1>Migrating from Axis 1.x to Axis 2</h1>
+<h2>Compatibility</h2>
+<p>Axis1.x and Axis2 have been evolved from different architectures.</p>
+<p>Speed - Axis2 is based on StAX API, which gives greater speed than SAX event base parsing that has been used in Axis1.x.</p>
+
+<p>Stability - Axis2 has fixed phases and for extensions an area of user defined phases. This allows far more stability and flexibility than Axis1.x.</p>
+
+<p>Transport framework - Simple abstraction designing of transports (i.e., senders and listeners for SOAP over various protocols such as SMTP, etc), allow far more flexibility and the core of the engine is completely transport-independent.</p>
+
+<p>WSDL Support - Axis2 supports version 1.1 and 2.0, which allow creating stubs and skeletons, to manipulate web service arena.</p>
+
+<p>Component - Oriented Architecture - This is merely through archives (.mar and .aar) . Easily reusable components such as Handlers, Modules allow patterns processing for your applications, or to distribute to partners. Axis2 more concern on the "Module" concept rather Handler concept. Modules contain handlers that have been ordered through phase rules. which being ordered to specific service(s). </p>
+
+<h2>Getting Started</h2>
+<p>Lets look at a simple example of echoing at client API</p>
+<p><b>Axis 1.x</b></p>
+<pre>
+import ..
+public class TestClient {
+	public static void main(String [] args) {
+		try {
+			String endpoint = ...
+			Service service = new Service();
+			Call call = (Call) service.createCall();
+			call.setTargetEndpointAddress( new java.net.URL(endpoint) );
+			call.setOperationName(new QName("http://soapinterop.org/", echoString"));
+			String ret = (String) call.invoke( new Object[] { "Hello!" } );
+			System.out.println("Sent 'Hello!', got '" + ret + "'");
+		} catch (Exception e) {
+			System.err.println(e.toString());
+		}
+	}
+}
+</pre>
+
+<p><b>Axis 2</b></p>
+<pre>
+import ....
+public class EchoBlockingClient {
+	private static EndpointReference targetEPR = new EndpointReference(
+	AddressingConstants.WSA_TO,
+				"http://127.0.0.1:8080/axis2/services/MyService/echo");
+	public static void main(String[] args) {
+		try {
+			OMElement payload = ClientUtil.getEchoOMElement();
+			Call call = new Call();
+			call.setTo(targetEPR);
+			call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,false);
+			//Blocking invocation
+			OMElement result = (OMElement) call.invokeBlocking("echo",payload);
+			...
+		} catch (AxisFault axisFault) {
+			axisFault.printStackTrace();
+		} catch (XMLStreamException e) {
+			e.printStackTrace();
+		}
+	}
+}
+</pre>
+
+<p>It has clearly depicted that the invocation in Axis2 is dealt with SOAP body element itself. Here the invocation is synchronous, and Axis2 can handle Asynchronous invocation as well. Above "payload" is the SOAP body element which should go in the Envelop.</p>
+
+<p>Once the service is called through Stub in Axis2, "payload" is according to the data binding framework that will be using. So the extra work of "payload" will be vanished.</p>
+
+<p>Apart from Synchronous invocation, Axis2 support Asynchronous invocation through invokeNonBlocking(). Synchronous/Asynchronous invocations can handle both single/double HTTP connection.</p>
+
+<p>With the advance architecture Axis2 is capable of handling Megabytes of Requests and Responses, which is far form Axis1.x. </p>
+
+<h2>Custom Deployment of Services, Handlers and Modules</h2>
+
+<p>In Axis 1.x deployment of services is via WSDD, which is for my opinion highly cumbersome. Service deployment in Axis2 is straight forward and dynamic. Dynamic behavior is from the Administrator facility given by development in server side. It's just a matter of creating a .aar file, and deploying it ,which more detail is given in the Axis2 user guide.</p>
+
+<p>Axis2 is far way from Handler concept and more into the Module concept, which is abstractly speaking, a collection of handlers with Rules of governing. Modules created as a .mar file. It has module.xml, which is the brain behind manipulating handlers.</p>
+
+<p>When a service is called through a handler, it is just a matter of giving reference to the module that includes the handler in the service.xml. Apart from that a handler can be directly called to a particular service, via service.xml, no module is needed, and several handlers can be invoked when the handlers are registered with the proper phases.</p>
+
+<p>Services are hot deployable in Axis2 and dynamic, but Modules. This is one feature, which is unique to Axis2.</p>
+
+<h2>Transports for HTTP Connection</h2>
+
+<p>Axis2 comes with two  CommonsHTTPTransportSender which is based on commons-httpclient. The configuration of the transport is as follows,</p>
+
+<pre>
+call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+</pre>
+
+<p>It should be noted that axis2.xml should be configured to call the commos transports, with the statement,</p>
+<pre><p align="justify">...</p><p align="left">&lt;transportSender name="commons-http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;</p> &lt;parameter name="PROTOCOL" locked="xsd:false"&gt;HTTP/1.1&lt;/parameter&gt;<p align="left"> &lt;parameter name="Transfer-Encoding" locked="xsd:false"&gt;chunked&lt;/parameter&gt;</p><p align="left">&lt;/transportSender&gt;</p><p align="justify">...</p></pre>
+
+<p>In above snippet it should be noted that transport is configured to handle the chunked stream as well. Some web services, such as .NET web service invocations are done through this transport, as it handle all possible HTTP request and responses.</p>
+
+<p>Data Binding Support</p>
+<p>Xml-beans is ued to provide data binding support. In Axis2, xml is manipulated via AXIOM, which is based on StAX API. XML give full schema support. Thus, serialization and deserialization of Xml is handle in Axis2 via xml-data binding framework.</p>
+
+<h2>Best Usage</h2>
+
+<p>Axis1.x and Axis2 have different ways of seen the SOAP stack. So the best way to migrate can be done through following the User guide and Architecture guide properly in Axis2. Axis2 is straight forward and friendly.</p>
+
+</body>
+</head>

Modified: webservices/axis/trunk/java/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/navigation.xml?rev=232961&r1=232960&r2=232961&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/navigation.xml (original)
+++ webservices/axis/trunk/java/xdocs/navigation.xml Tue Aug 16 01:44:38 2005
@@ -30,7 +30,7 @@
         <item name="REST Support" href="rest-ws.html"/>
         <item name="Handling Binary Data with Axis2" href="mtom-guide.html"/>
         <item name="Axis2 Configuration Guide" href="axis2config.html"/>
-        <item name="Migration from Axis 1.x" href="migration.htm"/>
+        <item name="Migrating from Axis 1.x" href="migration.html"/>
       </item>
       <item name="Get Invloved" href="overview.html">
         <item name="Checkout the Source" href="svn.html"/>

Modified: webservices/axis/trunk/java/xdocs/userguide.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/userguide.html?rev=232961&r1=232960&r2=232961&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/userguide.html (original)
+++ webservices/axis/trunk/java/xdocs/userguide.html Tue Aug 16 01:44:38 2005
@@ -317,10 +317,10 @@
    retDoc.setEchoStructReturn(outStruct);
   
    return retDoc;
-}</pre>
+}</pre></source>
 <h4>
 service.xml<br>
-</h4></source>
+</h4>
 <p>&nbsp;Axis2 uses &quot;service.xml&quot; to hold the 
 configuretions for a particular web service deployed in the Axis2 engine. When 
 we generate the skeleton using the WSDL2Java tool, it will also generate the