tag:blogger.com,1999:blog-44102565925905303942024-02-19T07:10:06.185+05:30SOA, BPM, BRMSSathwik B Phttp://www.blogger.com/profile/08466121218597057089noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4410256592590530394.post-11047037613763059262013-09-12T02:51:00.001+05:302014-10-30T18:05:58.469+05:30Apache ODE on Tomcat 7 with Bitronix Transaction Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;">With the coming release of Apache ODE 1.3.6 and there on, one would need to integrate a transaction manager in Tomcat in order to use an external database configuration for ODE.</span><br />
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;">Here I will list down the steps to integrate one of the open source transaction managers called <a href="http://docs.codehaus.org/display/BTM/Home" target="_blank">Bitronix</a> in tomcat and the associated changes in ODE web application.</span><br />
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><b>Step 1</b>: Download latest bitronix archive from <a href="http://docs.codehaus.org/display/BTM/Download" target="_blank">here</a>.</span><br />
<br />
<span style="font-family: Verdana,sans-serif;"><b>Step 2</b>: Copy these jars available in the bitronix archive to Tomcat\lib </span><br />
<ul>
<li><b><span style="font-family: Verdana,sans-serif;">btm-2.1.4.jar</span></b></li>
<b>
</b>
<li><b><span style="font-family: Verdana,sans-serif;">btm-tomcat55-lifecycle-2.1.4.jar</span></b></li>
<b>
</b>
<li><b><span style="font-family: Verdana,sans-serif;">geronimo-jta_1.1_spec-1.1.1.jar</span></b></li>
<b>
</b>
<li><b><span style="font-family: Verdana,sans-serif;">slf4j-api-1.6.4.jar</span></b></li>
<b>
</b>
<li><b><span style="font-family: Verdana,sans-serif;">slf4j-jdk14-1.6.4.jar </span></b></li>
</ul>
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><b>Step 3</b>: Follow Step 2 as <a href="http://docs.codehaus.org/display/BTM/Tomcat2x#Tomcat2x-Step2ConfigureBTMasthetransactionmanager" target="_blank">instructed</a> in the original guide of bitronix.</span><br />
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><b>Step 4</b>: Configure data sources </span><br />
<span style="font-family: Verdana,sans-serif;">Create a file name named <b>resources.properties</b> under <b><tomcat>/conf/</b> directory with the below contents: </span><br />
<span style="font-family: Verdana,sans-serif;">This config is for MYSQL database</span><br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Z5YFTHsuk9Ioe_Vnnfsjp2lkgVmm2freQ5qjnNznRIMCyLE0wVThksciBGl61qMAH3rXgbK7PxQz0Nip4zaE6Wl0F0KgFFtbYFir_RV9QO6HSC41lanbOYnZUQAg6kyhXPG6oTSMWzkQ/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> resource.ds2.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
resource.ds2.uniqueName=jdbc/ode
resource.ds2.minPoolSize=10
resource.ds2.maxPoolSize=50
resource.ds2.driverProperties.driverClassName=com.mysql.jdbc.Driver
resource.ds2.driverProperties.url=jdbc:mysql://localhost:3306/ode
resource.ds2.driverProperties.user=root
resource.ds2.driverProperties.password=mysql
resource.ds2.allowLocalTransactions=true
resource.ds2.shareTransactionConnections=true
</code></pre>
<br />
<span style="font-family: Verdana,sans-serif;"><b>Step 5</b>: Associate the datasource created in the previous step for ODE</span><br />
<span style="font-family: Verdana,sans-serif;">Create a file named <b>ode.xml</b> under <b><tomcat>/conf/Catalina/localhost/</b> directory with the below given contents:</span><br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> <Context reloadable="true" crossContext="true">
<Resource
name="jdbc/ode"
auth="Container" type="javax.sql.DataSource"
factory="bitronix.tm.resource.ResourceObjectFactory"
uniqueName="jdbc/ode" />
</Context>
</code></pre>
</div>
<div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><b>Step 6</b>: Change the web.xml of ODE</span><br />
<span style="font-family: Verdana,sans-serif;">Add these lines in the web.xml,</span><br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> <resource-ref>
<res-ref-name>jdbc/ode</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</code></pre>
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><b>Step 7</b>: Remove duplicate jars</span><br />
<span style="font-family: Verdana,sans-serif;">Remove <b>geronimo-jta_1.1_spec-1.1.jar</b> files from ode web application lib directory</span><br />
<span style="font-family: Verdana,sans-serif;"><br /></span>
<span style="font-family: Verdana,sans-serif;"><b>Step 8</b>: Edit ode-axis2.properties</span><br />
<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> ode-axis2.tx.factory.class=org.apache.ode.axis2.util.TomcatFactory
ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/ode
</code></pre>
</div>
Sathwik B Phttp://www.blogger.com/profile/08466121218597057089noreply@blogger.com8tag:blogger.com,1999:blog-4410256592590530394.post-16991621996591239642011-12-21T18:56:00.001+05:302011-12-21T23:51:46.757+05:30Understanding the Axis2 Non Blocking API<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
<!--
@page { margin: 2cm }
P { font-family: "Verdana", "arial", sans-serif }
-->
</style> <br />
<div style="text-align: justify;">
<span style="font-size: small;">The Non blocking api of axis2 facilitates asynchronous communication at the API level and at the Transport level.</span></div>
<div style="text-align: justify;">
<span style="font-size: small;">This document provides an understanding of how it works. The example in question uses dual transport channel.</span></div>
<div style="text-align: justify;">
<span style="font-size: small;">For this feature to work it is necessary to enable <b>WS-Addressing</b> on both the client and the server hosting the external web services.</span></div>
<br />
<div style="text-align: justify;">
<u><b>Scenario 1</b>:</u> <b>The external web service being invoked provides response in the same execution thread. </b><br />
<br />
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5sZ8FBDPxK_F2WTXYS8rFkIcD5HtegyJ1It2MngO4lcf9K9D7d1mj893gmiykiGLjKt3wTCu-qIKd_rp_PNoNE7VUpwtrrhH0_a9MxA-ROpcFnuRJfKLMI_aLlBKUqMHQZw8j-AvZMVg/s1600/NonBlocking-SyncWS.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5sZ8FBDPxK_F2WTXYS8rFkIcD5HtegyJ1It2MngO4lcf9K9D7d1mj893gmiykiGLjKt3wTCu-qIKd_rp_PNoNE7VUpwtrrhH0_a9MxA-ROpcFnuRJfKLMI_aLlBKUqMHQZw8j-AvZMVg/s400/NonBlocking-SyncWS.jpg" width="400" /></a></td></tr>
<tr align="center"><td class="tr-caption"><span style="font-size: small;"> Fig: 1</span> </td></tr>
</tbody></table>
<style type="text/css">
<!--
@page { margin: 2cm }
P { font-family: "Verdana", "arial", sans-serif }
-->
</style> <br />
<style type="text/css">
<!--
@page { margin: 2cm }
PRE.cjk { font-family: "WenQuanYi Micro Hei", monospace }
P { font-family: "Verdana", "arial", sans-serif }
TD P { font-family: "Verdana", "arial", sans-serif }
-->
</style> <br />
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="font-family: Verdana,sans-serif; font-size: small;">1) The axis client program prepares the request and invokes the sendReceiveNonBlocking(payload,callback) on the ServiceClient.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">2) The call is propagated to the AxisEngine, which then starts a Http transport listener on a predefined port specified in axis2.xml and registers the callback object on the listener. The response for the request would be communicated to this callback listener at a later point.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">3) A separate request execution thread is created and all the necessary objects are passed to it for further execution.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">4) The call returns back to the client program. The client program can continue with processing without having to wait for the response. Thus we achieve API level asynchrony.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">5) The request execution thread opens a transport out channel and sends the request data to the external web service.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">6) The external web service upon completion of its operation, communicates the response back to the callback listener through another transport out channel. Thus we have dual channels for communication.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">7) Finally HTTP 202 Ack is sent to the request execution thread through the initial channel in which the request was made. It is observed that the response and the 202 Ack comes back at almost the same time.</span><br />
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">Since the request channel is expecting the acknowledgment all this time, there is possibility that it can timeout if the external web service takes more time to respond. This problem can be solved partially by setting the connection timeout to an appropriate value.</span><br />
<br />
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">//connection timeout set to 60 seconds</span></div>
<div style="color: blue; font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">options.setTimeOutInMilliSeconds(60 * 1000);</span></div>
</div>
</div>
<br />
<div style="text-align: justify;">
<style type="text/css">
<!--
@page { margin: 2cm }
PRE.cjk { font-family: "WenQuanYi Micro Hei", monospace }
P { font-family: "Verdana", "arial", sans-serif }
-->
</style> </div>
<div style="text-align: justify;">
<br />
<u><b>Scenario 2</b>:</u><b> The external web service being invoked provides response in a separate execution thread.</b><br />
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">To enable this feature on a web service developed on axis2, an additional parameter has to be added in the services.xml for the web service.</span><br /><span style="color: blue; font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><parameter name="messageReceiver.invokeOnSeparateThread"> true </parameter></span></span><br /> </div>
<div style="text-align: justify;">
<br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimpoue23M6xPdWrRPeiiVdn3qt-yIdKhs4J9hj3KyQQsoJj7IrbODU-rjiTWWpo_fsDVL7zzlle510aVxST-QFzzBHc9l5MKMJL3PIREvplOfMOngUPBczeL0kOR4ACtgkbKY4nmy3v50/s1600/NonBlocking-ASyncWS.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimpoue23M6xPdWrRPeiiVdn3qt-yIdKhs4J9hj3KyQQsoJj7IrbODU-rjiTWWpo_fsDVL7zzlle510aVxST-QFzzBHc9l5MKMJL3PIREvplOfMOngUPBczeL0kOR4ACtgkbKY4nmy3v50/s400/NonBlocking-ASyncWS.jpg" width="400" /></a></div>
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig:2</span></td></tr>
</tbody></table>
<br />
<style type="text/css">
<!--
@page { margin: 2cm }
P { font-family: "Verdana", "arial", sans-serif }
TD P { font-family: "Verdana", "arial", sans-serif }
-->
</style> <br />
<div style="text-align: justify;">
<span style="font-family: Verdana,sans-serif; font-size: small;">1) The axis client program prepares the request and invokes the sendReceiveNonBlocking(payload,callback) on the ServiceClient.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">2) The call is propagated to the AxisEngine, which then starts a Http transport listener on a predefined port specified in axis2.xml and registers the callback object on the listener. The response for the request would be communicated to this callback listener at a later point.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">3) A separate request execution thread is created and all the necessary objects are passed to it for further execution.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">4) The call returns back to the client program. The client program can continue with processing without having to wait for the response. Thus we achieve API level asynchrony.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">5) The request execution thread opens a transport out channel and sends the request data to the external web service.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">6) HTTP 202 Ack is sent to the request execution thread immediately, and thus closing this channel.</span></div>
<div style="text-align: justify;">
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">7) The external web service upon completion of its operation, communicates the response back to the callback listener from a separate thread through another transport out channel. Thus we have dual channels for communication.</span><br />
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">Since the request channel is acknowledged immediately and the response is sent from another execution thread over another transport channel, there is no connection timeout issues encountered. Thus we achieve a full asynchronous behavior.</span></div>
<div style="text-align: justify;">
<br /></div>
<style type="text/css">
<!--
@page { margin: 2cm }
PRE.cjk { font-family: "WenQuanYi Micro Hei", monospace }
P { font-family: "Verdana", "arial", sans-serif }
TD P { font-family: "Verdana", "arial", sans-serif }
A:link { so-language: zxx }
-->
</style> <br />
<div style="font-family: Verdana,sans-serif; margin-bottom: 0cm;">
<span style="font-size: small;"><u><b>Sample client code:</b></u><b> EchoNonBlockingDualClient.java</b></span></div>
<pre class="western" style="border: medium none; color: blue; font-family: "Courier New",Courier,monospace; padding: 0cm;"><span style="font-size: x-small;"> <span style="font-size: small;">ServiceClient sender = null;
try {
OMElement payload = ClientUtil.getEchoOMElement();
Options options = new Options();
options.setTo(targetEPR);
options.setAction("urn:echo");
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setUseSeparateListener(true); </span></span></pre>
<pre class="western" style="border: medium none; color: blue; font-family: "Courier New",Courier,monospace; padding: 0cm;"><span style="font-size: small;"> // this is the action mapping we put within the service.xml</span><span style="font-size: small;">
options.setAction("urn:echo");
//timeout needs to be set incase of scenario 1 explained above
options.setTimeOutInMilliSeconds(60 * 1000);
//Callback to handle the response
MyAxisCallback callback = new MyAxisCallback();
//Non-Blocking Invocation
sender = new ServiceClient();
sender.engageModule(Constants.MODULE_ADDRESSING);
sender.setOptions(options);
sender.sendReceiveNonBlocking(payload, callback);
int i=0;
//Wait till the callback receives the response.
while (!callback.isComplete()) {
Thread.sleep(1000);
System.out.println("Waiting since:"+ ++i + " seconds");
}
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
System.out.println("cleaning called");
sender.cleanup();
System.out.println("cleaning completed");
} catch (AxisFault axisFault) {
//have to ignore this
System.out.println("cleaning error");
}
}</span></pre>
<br />
<br />
<span style="font-family: Verdana,sans-serif; font-size: small;">The use of separate request and response channels are indicated to the axis engine by setting the options </span><br />
<span style="font-family: Verdana,sans-serif; font-size: small;"><br /><span style="color: blue; font-family: "Courier New",Courier,monospace;">options.setUseSeparateListener(true);</span><br /><br />To check whether the response has been communicated to the callback from the external web service, we can poll the callback like given below.<br /><span style="font-family: "Courier New",Courier,monospace;"> </span></span><br />
<span style="font-family: Verdana,sans-serif; font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;">while (!callback.isComplete()) {</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> Thread.sleep(1000);</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> System.out.println("Waiting since:"+ ++i + " seconds"); </span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;">} </span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><br />Finally, we have to close all the resources which includes the client side callback listener. This is achieved by<br /><br /><span style="color: blue; font-family: "Courier New",Courier,monospace;">finally{</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> try{</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> sender.cleanup();</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> }catch(AxisFault af){</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> //ignore this</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;"> }</span><br style="color: blue; font-family: "Courier New",Courier,monospace;" /><span style="color: blue; font-family: "Courier New",Courier,monospace;">}</span></span><span style="color: blue; font-size: small;"> </span><b style="color: blue;"><span style="font-size: small;"> </span></b><br />
<br />
<u><b><span style="font-size: small;">Here are the steps to compile and run the sample:</span></b></u><br />
<br />
<div style="text-align: justify;">
<span style="font-family: Verdana,sans-serif; font-size: small;">1) Download the appropriate Axis2 binary from apache <a href="http://axis.apache.org/axis2/java/core/" target="_blank">axis2</a> website.The binary used to run the same was axis2-1.6.0. Extract the archive to the local drive.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana,sans-serif; font-size: small;"> </span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif; font-size: small;">2) Make sure that the ws-addressing module is enabled in the axis2.xml under </span><span style="font-family: Verdana,sans-serif; font-size: small;">axis2-1.6.0</span><span style="font-family: Verdana,sans-serif; font-size: small;">/conf directory.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana,sans-serif; font-size: small;">Uncomment the line <span style="font-family: "Courier New",Courier,monospace;"><module ref="addressing" /></span></span></div>
<div style="text-align: justify;">
<br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif; font-size: small;">3) <b><span style="font-family: "Courier New",Courier,monospace;">cd </span></b></span><b><span style="font-family: "Courier New",Courier,monospace; font-size: small;">axis2-1.6.0</span><span style="font-family: "Courier New",Courier,monospace; font-size: small;">/samples/userguide</span></b></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
<br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif; font-size: small;">4) </span><b><span style="color: #666666; font-family: "Courier New",Courier,monospace; font-size: small;">axis2-1.6.0</span></b><span style="font-family: "Courier New",Courier,monospace; font-size: small;"><b><span style="color: #666666;">/samples/userguide></span></b> <b>ant</b></span></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
<span style="font-family: Verdana,sans-serif; font-size: small;">The deployment archives are copied to the</span> <span style="font-family: Verdana,sans-serif; font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span><span style="font-family: Verdana,sans-serif; font-size: small;">axis2-1.6.0</span><span style="font-family: Verdana,sans-serif; font-size: small;">/repository/services</span></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
<br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif; font-size: small;">5) Run the axis2 server by executing the command at the terminal. </span></div>
<div style="font-family: "Courier New",Courier,monospace; text-align: justify;">
<b><span style="color: #666666; font-family: "Courier New",Courier,monospace; font-size: small;">axis2-1.6.0/bin></span><span style="font-family: Verdana,sans-serif; font-size: small;"><span style="color: #666666;"></span> ./axis2server.sh</span></b></div>
<div style="text-align: justify;">
<br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif; font-size: small;">6) Run the client program by executing the command </span></div>
<div style="text-align: justify;">
<b><span style="color: #666666; font-family: "Courier New",Courier,monospace; font-size: small;">axis2-1.6.0</span><span style="font-family: "Courier New",Courier,monospace; font-size: small;"><span style="color: #666666;">/samples/userguide></span></span></b><span style="font-family: Verdana,sans-serif; font-size: small;"> <b>ant run.client.nonblockingdual</b></span></div>
<span style="font-size: small;"><br /><br />
</span><br />
<u><i><b>Sample Request-Response:</b></i></u><br />
<pre class="western" style="border: medium none; font-family: "Courier New",Courier,monospace; padding: 0cm;"><span style="font-size: x-small;">POST /axis2/services/MyService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:echo"
User-Agent: Axis2
Host: 127.0.0.1:8080
Transfer-Encoding: chunked
288
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://127.0.0.1:8080/axis2/services/MyService</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://10.10.2.134:7070/axis2/services/anonService2/</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:b683fc84-a02e-49a4-a6a6-a4f5ca6b962d</wsa:MessageID>
<wsa:Action>urn:echo</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<example1:echo xmlns:example1="http://example1.org/example1">
<example1:Text>Axis2 Echo String </example1:Text>
</example1:echo>
</soapenv:Body>
</soapenv:Envelope>
0</span></pre>
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;"><i><b>Response:</b></i></span></div>
<pre class="western" style="border: medium none; font-family: "Courier New",Courier,monospace; padding: 0cm;"><span style="font-size: x-small;"><?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://10.10.2.134:7070/axis2/services/anonService2/</wsa:To>
<wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo>
<wsa:MessageID>urn:uuid:bec091be-7b92-40e4-8416-2b49863ceb53</wsa:MessageID>
<wsa:Action>urn:echoResponse</wsa:Action>
<wsa:RelatesTo>urn:uuid:b683fc84-a02e-49a4-a6a6-a4f5ca6b962d</wsa:RelatesTo>
</soapenv:Header>
<soapenv:Body>
<example1:echo xmlns:example1="http://example1.org/example1">
<example1:Text>Axis2 Echo String </example1:Text>
</example1:echo>
</soapenv:Body>
</soapenv:Envelope></span></pre>
<br /></div>Sathwik B Phttp://www.blogger.com/profile/08466121218597057089noreply@blogger.com0