tag:blogger.com,1999:blog-21662526842120920382024-03-21T13:23:25.795+05:30Isuru's Tech ThoughtsIsuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-2166252684212092038.post-51972217292382196102017-08-02T22:31:00.001+05:302017-08-02T22:31:33.170+05:30What is WSO2 ESB..?<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://wso2.com/products/enterprise-service-bus/" target="_blank">WSO2 ESB</a> is one of the leading Enterprise Service Buses out there in the market today. <br />
It is a lightweight, high performing and feature rich ESB which has built-in support for integration with various heterogeneous systems. And it is highly extensible too. So WSO2 ESB can be used to <b>connect anything to anything</b>. <br />
<br />
Following video gives you an overview of WSO2 ESB.<br />
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/-D1S4leqEbE" width="560"></iframe>
<br />
<br />
Following is a nice <a href="http://wso2.com/library/articles/2017/07/what-is-wso2-esb/" target="_blank">article</a> written by <a href="http://wso2.com/about/team/samisa-abeysinghe/" target="_blank">Samisa Abeysinghe</a> (Chief Engineering and Delivery Officer at WSO2) which covers following topics.<br />
<br />
<a href="http://wso2.com/library/articles/2017/07/what-is-wso2-esb/">http://wso2.com/library/articles/2017/07/what-is-wso2-esb/</a><br />
<br />
<ul style="text-align: left;">
<li>Key advantages of WSO2 ESB</li>
<ul>
<li>Powerful capabilities of WSO2 ESB </li>
</ul>
</ul>
<ul style="text-align: left;">
<li>When should you consider using an ESB?</li>
</ul>
<ul style="text-align: left;">
<li>Why WSO2 ESB?</li>
</ul>
<ul style="text-align: left;"><ul>
<li>Benefits of WSO2 ESB</li>
<li>WSO2 advantages over competitors</li>
</ul>
</ul>
To find more about WSO2 ESB, please checkout following resources.<br />
<br />
<a href="http://wso2.com/products/enterprise-service-bus/">http://wso2.com/products/enterprise-service-bus/</a><br />
<br />
<a href="https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Documentation">https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Documentation</a><br />
<br />
<br />
<br />
<br />
<br />
<ul style="text-align: left;"><ul>
</ul>
</ul>
</div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-2304667188588889442014-05-25T09:28:00.001+05:302014-05-25T09:28:50.498+05:30WSO2 ESB - A Troubleshoot Guide<div dir="ltr" style="text-align: left;" trbidi="on">
This blog post is about the latest article I published on WSO2 Library.<br />
<br />
The objective of this article is to provide users with a set of guidelines on troubleshooting issues that may occur when developing integration scenarios with WSO2 ESB.<br />
The first part of this article describes key troubleshooting techniques, and the latter part covers common issues you may encounter during the development stage as a result of misconfigurations.<br />
<br />
The following topics have been covered in this article.<br />
<ul style="text-align: left;">
<li>Troubleshooting Techniques</li>
<li>Debug logs</li>
<li>Trace logs</li>
<li>Monitoring Messages</li>
<ul>
<li>TCPMon</li>
<li>Wire Logs</li>
</ul>
<li>Solutions for Commonly Occurring Exceptions</li>
<li>Troubleshooting Timeout Issues</li>
<li>Mediation Fault Handling</li>
</ul>
<br />
The article is available in the WSO2 Library in the following location.<br />
<br />
<a href="http://wso2.com/library/articles/2014/05/wso2-esb-a-guide-to-troubleshoot/">http://wso2.com/library/articles/2014/05/wso2-esb-a-guide-to-troubleshoot/</a><br />
<br />
<br /></div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-81940321089666438192014-02-18T15:20:00.000+05:302014-02-19T09:04:44.976+05:30ESB Performance Round 7.5<div dir="ltr" style="text-align: left;" trbidi="on">
WSO2 ESB team has published the results of the latest ESB performance study "<a href="http://wso2.com/library/articles/2014/02/esb-performance-round-7.5/" target="_blank">ESB Performance Round 7.5</a>".<br />
<br />
This performance comparison was conducted for WSO2 ESB 4.8.1 against a number of leading open source ESBs.<br />
Results clearly shows that the WSO2 ESB outperforms all the other open-source ESBs.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI94mqhyTqJyEzy3-bh_XXldDSqTOlcvZ8RZWpdrT3qGdMH-mwIaEvCRdU46b-EqPJETA5DvWe-LbUh9zdrUp-MTYl6j3I7sZWqM_U7mk7m9VoyEKPktsGNQqEqwT9oA5mOsHb8EmA470/s1600/ESB+performance+7.5_table.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI94mqhyTqJyEzy3-bh_XXldDSqTOlcvZ8RZWpdrT3qGdMH-mwIaEvCRdU46b-EqPJETA5DvWe-LbUh9zdrUp-MTYl6j3I7sZWqM_U7mk7m9VoyEKPktsGNQqEqwT9oA5mOsHb8EmA470/s1600/ESB+performance+7.5_table.png" height="170" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIKiLnSCahdk33_7e1xEsCYJXx2930nKYfKRXbX3XeyCy-dUV_VKwoKPCgOirpHpuZ4y6ZJRHMBbXz0RSTAJTq7wc_nFquoz6nkhHzW404IxlTCxR0iNFSusFKU3TtPu8FfPefbcuhNCs/s1600/ESB+performance+7.5_chart_0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIKiLnSCahdk33_7e1xEsCYJXx2930nKYfKRXbX3XeyCy-dUV_VKwoKPCgOirpHpuZ4y6ZJRHMBbXz0RSTAJTq7wc_nFquoz6nkhHzW404IxlTCxR0iNFSusFKU3TtPu8FfPefbcuhNCs/s1600/ESB+performance+7.5_chart_0.png" height="316" width="640" /></a></div>
And one noticeable fact is that Mule ESB has gained some performance over UltraESB for CBRProxy and CBRSOAPHeaderProxy test cases which wasn't the case with performance round 7.</div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-77581230570263818102013-12-03T18:57:00.000+05:302014-02-19T09:35:18.053+05:30[WSO2 ESB] XSLT Mediator - XSLT Imports<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
There can be situations where we want to import xslt scripts to the main xslt script defined in XSLT mediator.<br />
This requirement can be achieved using Resources in XSLT mediator.<br />
<br />
Imported xslt file has to be defined as a XSLT Resource.<br />
<br />
Following is a sample.<br />
<br />
I have following two xslt files.<br />
<br />
<b>xslt1.xslt</b><br />
<br />
<pre class="brush: xml">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//people/person" name="FILL_PPL">
<client>
<firstname>
<xsl:value-of select="firstname">
</xsl:value-of></firstname>
<lastname>
<xsl:value-of select="lastname">
</xsl:value-of></lastname>
<age>
<xsl:value-of select="age">
</xsl:value-of></age>
<country>
<xsl:value-of select="country">
</xsl:value-of></country>
</client>
</xsl:template>
</xsl:stylesheet>
</pre>
<b><br /></b>
<b><br /></b>
<b>xslt2.xslt</b><br />
<br />
<pre class="brush: xml">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="xslt1.xslt">
<xsl:template match="/">
<clients>
<xsl:for-each select="//people/person">
<xsl:call-template name="FILL_PPL">
</xsl:call-template></xsl:for-each>
</clients>
</xsl:template>
</xsl:include></xsl:stylesheet>
</pre>
<br />
xslt1.xslt is included by the xslt2. Both files are stored in the registry under conf:/<br />
<br />
Following is a sample proxy service configuration.<br />
<pre class="brush: xml">
<proxy name="XSLIncludeTestProxy" startonload="true" trace="disable" transports="https http" xmlns="http://ws.apache.org/ns/synapse">
<description>
<target>
<insequence>
<xslt key="conf:/xslt2.xslt">
<resource key="conf:/xslt1.xslt" location="xslt1.xslt">
</resource></xslt>
<property name="RESPONSE" value="true">
<header action="remove" name="To">
<send>
</send></header></property></insequence>
</target>
</description></proxy>
</pre>
<br />
Note the resource element of xslt mediator configuration.<br />
<br />
<pre class="brush: xml">
<xslt key="conf:/xslt2.xslt">
<resource key="conf:/xslt1.xslt" location="xslt1.xslt">
</resource></xslt>
</pre>
Here location should be matched to the 'href' of <xsl:include> and key should point to the registry path of the included xslt file. </xsl:include><br />
<br />
Following is the request format to test this proxy configuration.<br />
<br />
<pre class="brush: xml">
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:header>
<soapenv:body>
<people>
<person>
<firstname>Isuru</firstname>
<lastname>Udana</lastname>
<gender>Male</gender>
<age>26</age>
<country>SriLanka</country>
</person>
<person>
<firstname>Ishan</firstname>
<lastname>Jayawardena</lastname>
<gender>Male</gender>
<age>26</age>
<country>SriLanka</country>
</person>
</people>
</soapenv:body>
</soapenv:header></soapenv:envelope>
</pre>
</div>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-87054676772899659802013-10-13T21:29:00.001+05:302013-10-13T21:32:23.043+05:30Synapse get-property function<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Get property function retrieves a property from the message context at the given
scope.
If the scope is not specified, property is retrieved from the default synapse
scope.
<br />
<br />
Syntax:<br />
get-property(String scope, String propertyName)<br />
get-property(String propertyName)<br />
<div class="section">
<h4>
</h4>
<div>
<br /></div>
<h4>
Supported Scopes
<a href="http://www.blogger.com/blogger.g?blogID=2166252684212092038" name="Supported_Scopes"></a></h4>
<ul>
<li>default</li>
<li>axis2</li>
<li>transport</li>
<li>registry</li>
<li>system</li>
</ul>
</div>
<div class="section">
<h4 id="default_scope">
</h4>
<h4 id="default_scope">
<br /></h4>
<h4 id="default_scope">
Default scope</h4>
Message context properties resides in synapse scope can be retrieved from the
default scope.
Apart from user defined properties, following special properties can be
retrieved
from the
default scope.
<br />
Syntax:<br />
<br />
<span style="color: #6aa84f;"><b><i>get-property('default', String propertyName)</i></b></span><br />
<span style="color: #6aa84f;"><b><i>get-property(String propertyName)</i></b></span><br />
<br />
<br />
<b>Special Properties supported by get-property function in Default Scope</b><br />
(Extracted from <a href="http://docs.wso2.org/display/ESB470/XPath+Extension+Functions">http://docs.wso2.org/display/ESB470/XPath+Extension+Functions</a>)<br />
<br />
<table border="1" cellpadding="1" cellspacing="1" class="bodyTable">
<tbody>
<tr class="a">
<td>Name</td>
<td>Return Value</td>
</tr>
<tr class="b">
<td>To</td>
<td>Incoming URL as a String or empty string if a To address is
not defined.
</td>
</tr>
<tr class="a">
<td>From</td>
<td>From address as a String or empty string if a From address
is not defined
</td>
</tr>
<tr class="b">
<td>Action</td>
<td>SOAP Action header value as a String or empty string
if a Action is not defined
</td>
</tr>
<tr class="a">
<td>FaultTo</td>
<td>SOAP FautTo header value as a String or empty string if a
FaultTo address is not defined
</td>
</tr>
<tr class="b">
<td>ReplyTo</td>
<td>ReplyTo header value as a String or empty string if a
ReplyTo address is not defined
</td>
</tr>
<tr class="a">
<td>MessageID</td>
<td>A unique identifier (UUID) for the message as a String .
This id is guaranteed to be unique.
</td>
</tr>
<tr class="b">
<td>FAULT</td>
<td>TRUE if the message has a fault or empty string if message doesn't
have a
fault
</td>
</tr>
<tr class="a">
<td>MESSAGE_FORMAT</td>
<td>Returns pox, get, soap11, soap12 depending on the message. If a
message type
is unknown this returns soap12
</td>
</tr>
<tr class="b">
<td>OperationName</td>
<td>Operation name corresponding to the message.
</td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<h4 id="axis2_scope">
</h4>
<div>
<br /></div>
<h4 id="axis2_scope">
Axis2 scope</h4>
Message context properties resides in axis2 scope can be retrieved from the axis2
scope.
<br />
Syntax:<br />
<span style="color: #6aa84f;"><i><b>get-property('axis2', String propertyName)</b></i></span></div>
<div class="section">
<h4 id="transport_scope">
</h4>
<div>
<br /></div>
<h4 id="transport_scope">
Transport scope</h4>
Message context properties resides in transport scope can be retrieved from the
transport scope.
<br />
Syntax:<br />
<i><b><span style="color: #6aa84f;">get-property('transport', String propertyName)</span></b></i></div>
<div class="section">
<h4 id="reg_scope">
</h4>
<div>
<br /></div>
<h4 id="reg_scope">
Registry scope</h4>
Properties resides in registry can be retrieved from the registry scope.<br />
Syntax:<br />
<span style="color: #6aa84f;"><b><i>get-property('registry', String registryPath@propertyName)</i></b></span><br />
<span style="color: #6aa84f;"><b><i>get-property('registry', String registryPath)</i></b></span></div>
<div class="section">
<h4 id="system_scope">
</h4>
<div>
<br /></div>
<h4 id="system_scope">
System scope</h4>
Java System properties can be retrieved from the system scope.
Syntax:<br />
<b><i><span style="color: #6aa84f;">get-property('system', String propertyName)</span></i></b><br />
<br />
Note: system scope is only available in synapse 3.0 or later versions and WSO2 ESB 4.8.0 or later versions.<br />
<br /></div>
</div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-35553407943601217182013-10-05T15:46:00.000+05:302013-10-05T16:00:11.174+05:30Maven Archetypes for WSO2 ESB Customizable Artifacts<div dir="ltr" style="text-align: left;" trbidi="on">
WSO2 ESB provides most of the features you need to build your integration scenarios.<br />
But there can be situations where built-in functionality is not sufficient to implement your requirement.<br />
To cope with those situations WSO2 ESB has given you the enough freedom to simply extend the functionality by implementing custom artifacts.<br />
<br />
Following are some of the main extension points where you can extend the functionality.<br />
<br />
1. <a href="http://docs.wso2.org/display/ESB470/Class+Mediator" target="_blank">Class Mediators</a><br />
2. <a href="http://docs.wso2.org/display/ESB470/Extending+Task" target="_blank">Custom Tasks</a><br />
3. Message Builders<br />
4. Message Formatters<br />
<br />
I am not going to discuss much on these artifacts here. Intention of this post is to provide you an easy way of creating these artifact projects.<br />
I have created <a href="http://maven.apache.org/guides/introduction/introduction-to-archetypes.html" target="_blank">maven-architypes</a> for above four artifacts.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzy7127r_qWf2Ol5NYAEnYjbtAMLn4b_ZX7lvRCgMmW60sxRjH_lr0gxgKyFY2ZNs8yitFQl_ijx8Lyi5JGeOGQATNfR707Yowm58-r_My7BrkYW4wdRg4CXDGZCoaLuksfGazaVDQZ1Q/s1600/maven.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzy7127r_qWf2Ol5NYAEnYjbtAMLn4b_ZX7lvRCgMmW60sxRjH_lr0gxgKyFY2ZNs8yitFQl_ijx8Lyi5JGeOGQATNfR707Yowm58-r_My7BrkYW4wdRg4CXDGZCoaLuksfGazaVDQZ1Q/s320/maven.png" width="320" /></a></div>
<br />
You can checkout them from <a href="https://svn.wso2.org/repos/wso2/people/isuruu/maven-architypes/" target="_blank">here</a>.<br />
<br />
<h4 style="text-align: left;">
Example usage</h4>
Let's create a project structure for a Class mediator.<br />
<br />
1. Go to maven-archetype-classmediator directory.<br />
Execute the command<br />
<i><b><span style="color: #38761d;">mvn install
</span></b></i><br />
<br />
This will install classmediator maven archetype to your maven repository.<br />
<br />
2. Go to the location where you want to create a new project structure.<br />
Execute the command<br />
<i><b><span style="color: #38761d;">mvn archetype:generate -DarchetypeCatalog=local -DarchetypeGroupId=org.wso2.carbon -DarchetypeArtifactId=maven-archetype-classmediator
</span></b></i><br />
<br />
3. You will be prompted to enter following details.<br />
groupId<br />
artifactId<br />
version<br />
mediator_name<br />
<br />
This will create the project structure for your class mediator.<br />
Now you can edit the Mediator java class and write your logic in the mediate() method.<br />
<br />
4. After writing the code, you can simply execute the command<br />
<i><b><span style="color: #38761d;">mvn clean install
</span></b></i><br />
to compile and create the jar file of the class mediator.<br />
<br /></div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-19242288351605847622013-09-29T22:05:00.000+05:302014-02-19T09:36:19.575+05:30[WSO2 ESB] Generate an UUID using a script mediator<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Following is a simple sequence which generates an UUID using a script mediator.<br />
<br />
<pre class="brush: xml">
<sequence name="GenerateUUID" xmlns="http://ws.apache.org/ns/synapse">
<script language="js">var result, i, j;
result = '';
for(j=0; j<32; j++)
{
if( j == 8 || j == 12|| j == 16|| j == 20)
result = result + '-';
i = Math.floor(Math.random()*16).toString(16).toUpperCase();
result = result + i;
}
mc.setProperty("CONTEXT_ID", result);
</script>
</sequence>
</pre>
<br />
Generated UUID is saved as a message context property.</div>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script></div>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-61005956031542623582013-09-22T21:51:00.002+05:302014-02-19T09:39:41.927+05:30[WSO2 ESB] Improve Callout Mediator Performance<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;"></b><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;"><span style="background-color: white; color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">Callout mediator internally uses the axis2 CommonsHTTPTransportSender to invoke services. </span></b></div>
<span style="background-color: white;"><b style="font-weight: normal; line-height: 1.15;"><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal; line-height: 1.15;"><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">According to [1] MultiThreadedHttpConnectionManager which manages the connections, only allow two simultaneous connections at a time per a host. </span></b><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal; line-height: 1.15;"><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">So with slow back-end services we will experience a significant degrade in the performance.</span></b></span><br />
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
<br /><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;"><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">To overcome this issue we can alter the default configuration and increase the number of simultaneous connections. </span></b></span></div>
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
<br /><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"></span></b><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal; line-height: 1.15;"><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">We can set the CommonsHTTPTransportSender parameters as follows at</span></b></span><br />
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
</b>
</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;"><span style="background-color: white; color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><ESB_HOME>/samples/axis2Client/client_repo/conf/axis2.xml </span></b></div>
</div>
</div>
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
</b>
</span><br />
<pre class="brush: xml"><span style="background-color: white;"><transportsender class="org.apache.axis2.transport.http.CommonsHTTPTransportSender" name="http">
<parameter name="PROTOCOL">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
<parameter name="cacheHttpClient">true</parameter>
<parameter name="defaultMaxConnectionsPerHost">100</parameter>
</transportsender>
</span></pre>
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
</b>
</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
</b>
</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="background-color: white; font-weight: normal;"><br /></b></div>
<span style="background-color: white;"><b id="docs-internal-guid-2da1b605-466e-5677-0c63-2f39b9b710ef" style="font-weight: normal;">
</b>
<span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"></span>In the above configuration, <span id="docs-internal-guid-2da1b605-4670-db07-f55b-39477b8bcdf3"><span style="color: #222222; font-family: Arial; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">defaultMaxConnectionsPerHost </span><span style="color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">parameter has increased to 100. </span></span></span><br />
<span style="background-color: white;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">For more information about improving axis2 http transport client, refer to the resource available at [1].</span></div>
<span style="background-color: white;"><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white;"><span style="font-family: Arial; vertical-align: baseline; white-space: pre-wrap;">[1] </span><a href="http://amilachinthaka.blogspot.com/2010/01/improving-axis2-http-transport-client.html" style="text-decoration: none;"><span style="color: #1155cc; font-family: Arial; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://amilachinthaka.blogspot.com/2010/01/improving-axis2-http-transport-client.html</span></a><span style="font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<span style="background-color: white;"><br /></span>
<span style="background-color: white;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /></span>
<span style="background-color: white;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /></span>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white;"><br /></span></div>
<div>
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script>
</div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-82558753971848934422013-09-22T20:54:00.001+05:302013-09-22T21:58:42.813+05:30[WSO2 ESB] All About Wire Logs..!<div dir="ltr" style="text-align: left;" trbidi="on">
<b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"><span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Intention of this post is to give you an idea of what you should know about wire logs in WSO2 ESB.</span></b></div>
<span style="font-family: inherit;"><b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></b>
</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"><span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">While working with ESB, sometimes we come across situations where we want see the actual http messages which goes out from the ESB or coming into the ESB. Wire logs functionality is there to fulfill that requirement.</span></b></div>
<b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"><span style="font-family: inherit;">
<br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"><span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Passthrough http transport is the main transport which handles http/https messages in WSO2 ESB. Following is how we can enable wire logs for Passthrough http transport.</span></b></div>
<b id="docs-internal-guid-5a54bf2e-4634-7d62-8354-f8b20eceb54d" style="font-weight: normal;"><span style="font-family: inherit;">
<br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><h3 style="text-align: left;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Enabling wire logs</span></h3>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">1. open log4j.properties file from a text editor.</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">log4j.properties file is located in <esb_home>/repository/conf directory.</esb_home></span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">2. Un-comment the following entry.</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><i>log4j.logger.org.apache.synapse.transport.http.wire=DEBUG</i></span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Above described procedure applies to WSO2 ESB 4.7.0 or higher versions.</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Entry to un-comment in log4j.properties is slightly different in previous versions.</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit;"><br /></span></div>
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">For ESB 4.6.0 :</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><i>log4j.logger.org.apache.synapse.transport.passthru.wire=DEBUG</i></span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">For ESB 4.5.1 or previous versions :</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><i>log4j.logger.org.apache.synapse.transport.nhttp.wire=DEBUG</i></span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><h3 style="text-align: left;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Reading wire logs</span></h3>
<br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><img height="172px;" src="https://docs.google.com/drawings/d/sfh6iiX-Za4H8KqU15FCJPg/image?w=542&h=172&rev=1&ac=1" width="542px;" /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Following is a sample wire log get printed for the above scenario for a one request.</span></div>
<br /><span style="background-color: yellow; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,797] DEBUG - wire >> "POST /services/StockQuoteProxy HTTP/1.1[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,798] DEBUG - wire >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,798] DEBUG - wire >> "SOAPAction: "urn:getQuote"[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,799] DEBUG - wire >> "User-Agent: Axis2[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,799] DEBUG - wire >> "Host: localhost:8280[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,799] DEBUG - wire >> "Transfer-Encoding: chunked[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,800] DEBUG - wire >> "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,800] DEBUG - wire >> "215[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,800] DEBUG - wire >> "<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:to>http://localhost:8280/services/StockQuoteProxy</wsa:to><wsa:messageid>urn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f67</wsa:messageid><wsa:action>urn:getQuote</wsa:action></soapenv:header><soapenv:body><m0:getquote xmlns:m0="http://services.samples"><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getquote></soapenv:body></soapenv:envelope>[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,801] DEBUG - wire >> "0[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: yellow; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,801] DEBUG - wire >> "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,846] INFO - TimeoutHandler This engine will expire all callbacks after : 120 seconds, irrespective of the timeout action, after the specified or optional timeout</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,867] DEBUG - wire << "POST /services/SimpleStockQuoteService HTTP/1.1[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,867] DEBUG - wire << "Content-Type: text/xml; charset=UTF-8[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,867] DEBUG - wire << "SOAPAction: "urn:getQuote"[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,867] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "Host: localhost:9000[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "215[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:to>http://localhost:8280/services/StockQuoteProxy</wsa:to><wsa:messageid>urn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f67</wsa:messageid><wsa:action>urn:getQuote</wsa:action></soapenv:header><soapenv:body><m0:getquote xmlns:m0="http://services.samples"><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getquote></soapenv:body></soapenv:envelope>[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,868] DEBUG - wire << "0[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: lime; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:57,869] DEBUG - wire << "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,002] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,002] DEBUG - wire >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,002] DEBUG - wire >> "Date: Sun, 22 Sep 2013 14:17:57 GMT[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,002] DEBUG - wire >> "Transfer-Encoding: chunked[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,002] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,002] DEBUG - wire >> "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,014] DEBUG - wire << "HTTP/1.1 200 OK[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,015] DEBUG - wire << "Content-Type: text/xml; charset=UTF-8[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,015] DEBUG - wire << "Date: Sun, 22 Sep 2013 14:17:58 GMT[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,015] DEBUG - wire << "Server: WSO2-PassThrough-HTTP[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,016] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,016] DEBUG - wire << "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,016] DEBUG - wire >> "4d8[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,017] DEBUG - wire >> "<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:action>urn:getQuoteResponse</wsa:action><wsa:relatesto>urn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f67</wsa:relatesto></soapenv:header><soapenv:body><ns:getquoteresponse xmlns:ns="http://services.samples"><ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse"><ax21:change>3.827143922330303</ax21:change><ax21:earnings>-8.819296796724336</ax21:earnings><ax21:high>-170.50810412063595</ax21:high><ax21:last>170.73218944560944</ax21:last><ax21:lasttradetimestamp>Sun Sep 22 19:47:57 IST 2013</ax21:lasttradetimestamp><ax21:low>-170.47207702478278</ax21:low><ax21:marketcap>5.562077973231586E7</ax21:marketcap><ax21:name>IBM Company</ax21:name><ax21:open>178.06167129322813</ax21:open><ax21:peratio>24.943890404922264</ax21:peratio><ax21:percentagechange>1.9564266653777567</ax21:percentagechange><ax21:prevclose>195.61908401976004</ax21:prevclose><ax21:symbol>IBM</ax21:symbol><ax21:volume>6216</ax21:volume></ns:return></ns:getquoteresponse></soapenv:body></soapenv:envelope>[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,017] DEBUG - wire >> "0[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #ead1dc; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,018] DEBUG - wire >> "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,021] DEBUG - wire << "4d8[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,022] DEBUG - wire << "<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:action>urn:getQuoteResponse</wsa:action><wsa:relatesto>urn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f67</wsa:relatesto></soapenv:header><soapenv:body><ns:getquoteresponse xmlns:ns="http://services.samples"><ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse"><ax21:change>3.827143922330303</ax21:change><ax21:earnings>-8.819296796724336</ax21:earnings><ax21:high>-170.50810412063595</ax21:high><ax21:last>170.73218944560944</ax21:last><ax21:lasttradetimestamp>Sun Sep 22 19:47:57 IST 2013</ax21:lasttradetimestamp><ax21:low>-170.47207702478278</ax21:low><ax21:marketcap>5.562077973231586E7</ax21:marketcap><ax21:name>IBM Company</ax21:name><ax21:open>178.06167129322813</ax21:open><ax21:peratio>24.943890404922264</ax21:peratio><ax21:percentagechange>1.9564266653777567</ax21:percentagechange><ax21:prevclose>195.61908401976004</ax21:prevclose><ax21:symbol>IBM</ax21:symbol><ax21:volume>6216</ax21:volume></ns:return></ns:getquoteresponse></soapenv:body></soapenv:envelope>[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,022] DEBUG - wire << "0[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #cfe2f3; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: x-small;">[2013-09-22 19:47:58,022] DEBUG - wire << "[\r][\n]"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">To read the wire log, first we have to identify message direction.</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">DEBUG - wire >> - This represent the message coming into ESB from the wire</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">DEBUG - wire << - This represent the message goes to the wire from ESB</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">As you can see there are two incoming messages and two outgoing messages in the above log.</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">First part of the log of a message contain the http headers and it is followed by the message payload.</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Wire logs are very useful when it comes to troubleshooting unexpected issues occurring while integrating systems. </span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">We can verify whether message payload is correctly going out from the ESB, http headers like Content-Type is properly set in the outgoing message, etc. by looking at the wire logs.</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Please note that wire logs should be enabled for the troubleshooting purposes only. Running productions systems with wire logs enabled is not recommended.</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><h3 style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Wire logs for Callout Mediator</span></h3>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Callout mediator uses the Axis2 CommonsHTTPSender to invoke services. It does not leverages the non blocking nhttp/passthrough transports. So to enable wire logs, we have to follow a different approach as follows.</span></div>
<span style="font-family: inherit;"><br /><span style="background-color: white; color: #222222; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">1. open log4j.properties file from a text editor.</span></div>
<span style="font-family: inherit;"><br /><span style="font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">2. Put the following two entries to the log4j.properties.</span><br />
<span style="font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><i>log4j.logger.httpclient.wire.header=DEBUG</i></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<i><span style="background-color: white; color: #222222; font-family: inherit; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">log4j.logger.httpclient.wire.content=DEBUG</span><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></i></div>
<br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<br />
<div>
<b style="font-weight: normal;"><br /></b></div>
</div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com1tag:blogger.com,1999:blog-2166252684212092038.post-26061853977672206072013-07-04T21:56:00.001+05:302014-02-19T09:56:40.939+05:30[WSO2 ESB] How to set an enclosing element for Aggregated Messages<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" trbidi="on">
In this post I am describing how we can add an enclosing element (root element) for the aggregated message of the Aggregate mediator.</div>
<div dir="ltr" trbidi="on">
<br /></div>
<div dir="ltr" trbidi="on">
To explain the scenario I am using the <a href="http://docs.wso2.org/wiki/display/ESB470/Sample+400%3A+Message+Splitting+and+Aggregating+the+Responses" target="_blank">sample 400</a> which is shipped with WSO2 ESB.</div>
<div dir="ltr" trbidi="on">
Setup and run the sample following the instruction given in <a href="http://docs.wso2.org/wiki/display/ESB470/Sample+400%3A+Message+Splitting+and+Aggregating+the+Responses" target="_blank">this link</a>.</div>
<div dir="ltr" trbidi="on">
<br /></div>
<div dir="ltr" trbidi="on">
Inspect the response received to the axis2Client by placing TCPMon in between axis2Client and ESB.</div>
<div dir="ltr" trbidi="on">
<br /></div>
<div dir="ltr" trbidi="on">
Following is a sample response message.</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<pre class="brush: xml"> <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:body>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>4.090953902529174</ax21:change>
<ax21:earnings>12.85037561648507</ax21:earnings>
<ax21:high>82.1992668503766</ax21:high>
<ax21:last>79.11591459453155</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 19:12:12 IST 2013</ax21:lasttradetimestamp>
<ax21:low>82.07587397906588</ax21:low>
<ax21:marketcap>-6710370.759280889</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>82.63216328626984</ax21:open>
<ax21:peratio>-17.95776979490757</ax21:peratio>
<ax21:percentagechange>-5.425366866770642</ax21:percentagechange>
<ax21:prevclose>-75.40418930165814</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>18847</ax21:volume>
</ns:return>
</ns:getquoteresponse>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>-2.7046470446807556</ax21:change>
<ax21:earnings>12.566122355911308</ax21:earnings>
<ax21:high>95.09065335757121</ax21:high>
<ax21:last>90.75101849376846</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 19:12:12 IST 2013</ax21:lasttradetimestamp>
<ax21:low>-90.38486186977777</ax21:low>
<ax21:marketcap>4.217188439214337E7</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>94.37670271591331</ax21:open>
<ax21:peratio>25.37945343517513</ax21:peratio>
<ax21:percentagechange>3.0241695702614373</ax21:percentagechange>
<ax21:prevclose>-89.43437138172582</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>19672</ax21:volume>
</ns:return>
</ns:getquoteresponse>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>4.170662251407396</ax21:change>
<ax21:earnings>12.24073118459008</ax21:earnings>
<ax21:high>57.80396418762341</ax21:high>
<ax21:last>55.33092046169671</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 19:12:12 IST 2013</ax21:lasttradetimestamp>
<ax21:low>-54.950295275739805</ax21:low>
<ax21:marketcap>6356550.833371431</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>-54.49917237967579</ax21:open>
<ax21:peratio>-17.964379539768633</ax21:peratio>
<ax21:percentagechange>-8.124197423811651</ax21:percentagechange>
<ax21:prevclose>-51.336298637738366</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>18228</ax21:volume>
</ns:return>
</ns:getquoteresponse>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>-2.298457196037509</ax21:change>
<ax21:earnings>13.480896570232673</ax21:earnings>
<ax21:high>59.92552901947371</ax21:high>
<ax21:last>58.08646649831848</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 19:12:12 IST 2013</ax21:lasttradetimestamp>
<ax21:low>60.343852005584246</ax21:low>
<ax21:marketcap>1528927.6138464957</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>-57.030367770791436</ax21:open>
<ax21:peratio>24.09552605569928</ax21:peratio>
<ax21:percentagechange>-3.6045836945736744</ax21:percentagechange>
<ax21:prevclose>63.76484473082417</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>8436</ax21:volume>
</ns:return>
</ns:getquoteresponse></soapenv:body></soapenv:envelope>
</pre>
<br />
<br />
You can see this message contains multiple root elements (getQuoteResponse).<br />
Having message in this format causes difficulties in mediating the message further using other mediators.<br />
To overcome this we have to enclose these elements with a single root element.<br />
<br />
In ESB 4.7.0 a new configuration option for aggregate mediator has introduced to simply achieve this requirement.<br />
We can define the root element in a property of type "OM" in the mediation follow.<br />
To refer to it, we have the configuration option in the aggregate mediator called "<b>enclosingElementProperty</b>".
Following is the modified configuration of sample 400 with setting the enclosingElementProperty.
<br />
<br />
<br />
<pre class="brush: xml"><proxy name="SplitAggregateProxy" startonload="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
<target>
<insequence>
<property name="ROOT" scope="default">
<root:rootelement xmlns:root="www.wso2esb.com">
</root:rootelement></property>
<iterate attachpath="//m0:getQuote" expression="//m0:getQuote/m0:request" preservepayload="true" xmlns:m0="http://services.samples">
<target>
<sequence>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService">
</address>
</endpoint>
</send>
</sequence>
</target>
</iterate>
</insequence>
<outsequence>
<aggregate>
<completecondition>
<messagecount max="-1" min="-1">
</messagecount></completecondition>
<oncomplete enclosingelementproperty="ROOT" expression="//m0:getQuoteResponse" xmlns:m0="http://services.samples">
<send>
</send></oncomplete>
</aggregate>
</outsequence>
</target>
<description>
</description></proxy>
</pre>
<br />
<br />
Following is the new response after specifying the enclosing element.
<br />
<br />
<pre class="brush: xml"><soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:body>
<root:rootelement xmlns:root="www.wso2esb.com">
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>3.9054693448138935</ax21:change>
<ax21:earnings>12.335281253927821</ax21:earnings>
<ax21:high>-177.97866140275778</ax21:high>
<ax21:last>180.6047969462028</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 20:16:43 IST 2013</ax21:lasttradetimestamp>
<ax21:low>-178.7391258359091</ax21:low>
<ax21:marketcap>1.3120681155222666E7</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>188.41308732511013</ax21:open>
<ax21:peratio>-18.48633858561689</ax21:peratio>
<ax21:percentagechange>-2.1801479505634216</ax21:percentagechange>
<ax21:prevclose>-179.1378123583123</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>17410</ax21:volume>
</ns:return>
</ns:getquoteresponse>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>4.335889120902175</ax21:change>
<ax21:earnings>13.604356794261104</ax21:earnings>
<ax21:high>91.1089618318819</ax21:high>
<ax21:last>87.11090922338691</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 20:16:43 IST 2013</ax21:lasttradetimestamp>
<ax21:low>91.25197685882299</ax21:low>
<ax21:marketcap>-9612036.072947197</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>89.76683766211949</ax21:open>
<ax21:peratio>23.079190443619655</ax21:peratio>
<ax21:percentagechange>4.535561151210772</ax21:percentagechange>
<ax21:prevclose>95.59763337651628</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>19489</ax21:volume>
</ns:return>
</ns:getquoteresponse>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>3.904415274394834</ax21:change>
<ax21:earnings>-9.582989781384908</ax21:earnings>
<ax21:high>164.68152083949627</ax21:high>
<ax21:last>159.73864569317885</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 20:16:43 IST 2013</ax21:lasttradetimestamp>
<ax21:low>165.07866093659734</ax21:low>
<ax21:marketcap>1.4527017539759804E7</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>164.61880563666864</ax21:open>
<ax21:peratio>-18.161817565866475</ax21:peratio>
<ax21:percentagechange>-2.4852000517090636</ax21:percentagechange>
<ax21:prevclose>-157.1066792675214</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>7699</ax21:volume>
</ns:return>
</ns:getquoteresponse>
<ns:getquoteresponse xmlns:ns="http://services.samples">
<ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse">
<ax21:change>-2.457821949254824</ax21:change>
<ax21:earnings>-8.469473263282257</ax21:earnings>
<ax21:high>87.5648992841946</ax21:high>
<ax21:last>83.84165661337398</ax21:last>
<ax21:lasttradetimestamp>Thu Jul 04 20:16:43 IST 2013</ax21:lasttradetimestamp>
<ax21:low>87.65683642867681</ax21:low>
<ax21:marketcap>5.546665982864492E7</ax21:marketcap>
<ax21:name>IBM Company</ax21:name>
<ax21:open>-81.82301069483687</ax21:open>
<ax21:peratio>-18.228056188981697</ax21:peratio>
<ax21:percentagechange>-2.6735315383132683</ax21:percentagechange>
<ax21:prevclose>91.93166095229475</ax21:prevclose>
<ax21:symbol>IBM</ax21:symbol>
<ax21:volume>19549</ax21:volume>
</ns:return>
</ns:getquoteresponse>
</root:rootelement>
</soapenv:body>
</soapenv:envelope>
</pre>
</div>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script></div>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-20027910214950429632013-07-04T15:46:00.000+05:302013-07-04T15:50:19.020+05:30WSO2 Enterprise Service Bus (ESB) 4.7.0 Released!<div dir="ltr" style="text-align: left;" trbidi="on">
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Version 4.7.0 of <a href="http://wso2.com/products/enterprise-service-bus/" target="_blank">WSO2 ESB</a>, the High Performance, lightweight Open Source ESB was released yesterday.</span></span></div>
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><span style="font-weight: normal;"><img height="89px;" src="https://lh4.googleusercontent.com/XaxsxuPze1O7DD_U_Jxy1UhKVSSEUq64xcT52Q3fRcB_aoDK6ulavOOhDynSq8aDo33cofUW-UhdO-PdTqjGPXYKYBNxzVTeaQdwbgFxkWogDxIuUFYB3HyI" width="545px;" /></span><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Following are the brand new features introduced in this release.</span></span></div>
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e">
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">Comprehensive REST integration support with HTTP Endpoints</span></b></div>
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e">
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">HTTP Endpoint has made the integration with REST services much simpler by allowing us to specify URI Template like endpoint addresses. Endpoint URI can contain variables which can be populated at the runtime.</span></div>
<div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">HTTP method also can be specified within the HTTP Endpoint itself.</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">JSON support for Payload Factory Mediator</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Payload Factory mediator is one of the widely used mediators to do message format transformations. In previous versions, payload format can be specified only in XML. If we want to integrate with services which expect the message in JSON format, we have to construct the message in XML format and set the message type property to application/json to get the message converted to JSON.</span></div>
<div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">In ESB 4.7.0 payload format can be specified directly in JSON format. This is a very useful feature which makes the integration with REST services much simpler. </span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">SSL Tunneling Support</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">SSL Tunneling support is introduced to both PassThroughHttp and Nhttp transports.</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">SSL Profiles for both inbound and outbound scenarios</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">SSL Profiles are supported only for Outbound scenarios in previous versions. In this version of WSO2 ESB we can configure SSL profiles for both Inbound and Outbound scenarios. </span></div>
<div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">ESB can listen for the incoming HTTPS connections from different host IPs and Ports. Inbound SSL profiles feature allows us to have a separate SSL profile for different hosts. We can have a separate trust store and a key store for a SSL profile. </span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">Inbound Connection Throttling support for Pass-Thru and NHTTP transports</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">With this feature we can limit the number of simultaneous connections which can be established with the ESB.</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">CRL/OCSP Certificate Revocation Verification</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">This feature allows to check whether the the given X509 certificate is still a valid certificate (not revoked by CA) at the verification phase of SSL handshake. OCSP/CRL certificate verification process is widely used where high computer security is concerned. </span></div>
<div style="font-weight: normal;">
<b style="font-weight: normal;"><br /></b></div>
<br />
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"></b><br />
<div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">Enhancements</span></b></div>
<br />
<div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Following are the other major enhancements in this release.</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<ul style="text-align: left;">
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Enhanced Message Stores and Processors for Guaranteed Delivery and Rate Matching Scenarios</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">High Performance Multitenant REST APIs support with Pass-Thru Transport</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Stabilizing Registry Based Deployment Synchronizer</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Invoking Sequences and Proxy Service from Scheduled Tasks</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">HL7 Enhancements to support Application-Acknowledgement and Auto-Acknowledgement scenarios</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Transport Header manipulation in Header Mediator</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Enhancement on Content Negotiation in RESTful integration(ie: POX with text/xml)</span></div>
</b></li>
<li><b id="docs-internal-guid--a69d118-a922-7b12-fbc0-5b671863151e"><div dir="ltr" style="display: inline !important; font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">JMS MapMessage compatibility for JMS Transport</span></div>
</b></li>
</ul>
<br />
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Apart from the above new features and enhancements, this release of WSO2 ESB comes with significant number (393) of <a href="https://wso2.org/jira/issues/?filter=11177" target="_blank">bug fixes</a>.</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><div dir="ltr" style="font-weight: normal; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">You can download the distribution of WSO2 ESB 4.7.0 from </span><a href="http://wso2.com/products/enterprise-service-bus/" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://wso2.com/products/enterprise-service-bus/</span></a><span style="background-color: white; color: #222222; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"> and give it a try.</span></div>
<br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></b></div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-86488692321640608262013-03-28T09:47:00.000+05:302014-02-19T09:57:26.279+05:30[WSO2 ESB] XSLT Mediator Properties<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
In this post I am discussing how we can use "Properties of the <a href="http://docs.wso2.org/wiki/display/ESB451/XSLT+Mediator" target="_blank">XSLT mediator</a>" in XSLT transformations.<br />
<br />
We can inject Properties which we set in the mediation flow to the XSLT script as a XSLT parameter.<br />
<br />
Following is a sample configuration of a XSLT mediator having a property.<br />
<br />
<br />
<pre class="brush: xml"><xslt key="keyToXSLTFile">
<property expression="$ctx:ORDER_ID" name="PARAM_NAME">
</property></xslt>
</pre>
</div>
<br />
<br />
Here PARAM_NAME is the name of the Property and the value is calculated using a xpath expression. Here we assign the value of the "ORDER_ID" property which is in the default scope.<br />
<br />
Following is a sample XSLT script.<br />
<br />
<pre class="brush: xml"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="PARAM_NAME"></xsl:param>
<xsl:template match="/">
<orders xmlns="http://services.samples">
<xsl:attribute name="id">
<xsl:value-of select="$PARAM_NAME">
</xsl:value-of></xsl:attribute>
</orders>
</xsl:template>
</xsl:stylesheet>
</pre>
<br />
First we have to define the parameter as follows. Name should be identical to the name of the property.<br />
<pre class="xml" name="code"><xsl:param name="PARAM_NAME"></xsl:param></pre>
<br />
<br />
Then we can access the value of the parameter as follows.<br />
<pre class="xml" name="code"><xsl:value-of select="$PARAM_NAME"></xsl:value-of></pre>
<br />
<br />
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script>
</div>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-50443301431263525702013-02-10T15:57:00.000+05:302013-06-30T23:01:03.016+05:30My Experience with World's Fastest ESB<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">The world's fastest ESB, 4.6.0 version of <a href="http://wso2.com/products/enterprise-service-bus/" target="_blank">WSO2 ESB</a> got released few days ago.</span></b><br />
<b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Comparing to earlier versions of WSO2 ESB, this version has improved significantly in mediation performance.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"> </span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">In this version, Pass-through HTTP transport is used as the default http transport.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Pass-through transport is there since ESB 4.0.0 but the major disadvantage in previous versions is, Pass-through transport was supported only for pass through mediation scenario (pass through proxy) and for the transport header based routing. Content aware mediation scenarios like CBR (content based routing) was not supported by Pass-through transport. That prevented making the Pass-through the default transport for HTTP even though it performs well over NHTTP transport. </span></b><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">In 4.6.0, Pass-through transport supports both content aware and content unaware mediation scenarios, so now there is nothing preventing from making it the default transport for http. <a href="http://www.blogger.com/profile/17230790150335483296" target="_blank">Hiranya</a> has written a very nice detailed post on “</span><span style="color: #1155cc; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><a href="http://techfeast-hiranya.blogspot.com/2013/02/how-worlds-fastest-esb-was-made.html">How the World's Fastest ESB was Made”</a> </span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">explaining the history and the technology behind the Pass-through transport. </span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Recent performance evaluation, <a href="http://wso2.org/library/articles/2013/01/esb-performance-65" target="_blank">ESB Performance Round 6.5</a> shows how well the WSO2 ESB 4.6.0 outperforms the others. Following is a graph extracted from the results published in ESB Performance Round 6.5.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"> </span></b><br />
<b style="font-weight: normal;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmZ6kva9tveOdAvGEqRWPdrY27UuGzlcEQydRSatEQRgm7r8V3WejZBIop6r9ilAN-kJKhl6uIWLYcNcU9Vo79VaFtbmv8QGSpyurGtzrrVJnVOEk50295v9OuBhfU6h40-c1B8FkSIJo/s1600/ESB-graph1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="409" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmZ6kva9tveOdAvGEqRWPdrY27UuGzlcEQydRSatEQRgm7r8V3WejZBIop6r9ilAN-kJKhl6uIWLYcNcU9Vo79VaFtbmv8QGSpyurGtzrrVJnVOEk50295v9OuBhfU6h40-c1B8FkSIJo/s640/ESB-graph1.png" width="640" /></a><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b style="text-align: left;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><span style="font-weight: normal;">Following graph illustrate the memory usage throughout 40 hours of long running performance test. </span></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b style="text-align: left;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><span style="font-weight: normal;">It indicates how stable ESB 4.6.0 under </span>high load<span style="font-weight: normal;"> for a long period of time. </span></span></b></div>
<b><br /></b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuDO1dcHEan3185n2AlNlYnP-RJ5eAYP_pWwfnxSXoSM6mAnujQC4gLDn5Hv2dy5gf33k1jf1FngFFCja7LxAqm73opINf29IGWOGPq6FSd6juHRQzNw0NuDuic8zq6PpkedHwIR034o0/s1600/ESB-graph2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuDO1dcHEan3185n2AlNlYnP-RJ5eAYP_pWwfnxSXoSM6mAnujQC4gLDn5Hv2dy5gf33k1jf1FngFFCja7LxAqm73opINf29IGWOGPq6FSd6juHRQzNw0NuDuic8zq6PpkedHwIR034o0/s640/ESB-graph2.png" width="640" /></a><b><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> </span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Last week I got a chance to work on implementing an integration scenario for a <a href="http://wso2con.com/agenda/#tutorials" target="_blank">tutorial session</a> of <a href="http://wso2con.com/" target="_blank">WSO2Con 2013</a> together with <a href="http://www.blogger.com/profile/01843642831558293309" target="_blank">Kasun</a> and Ishan.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">The scenario is an extended version of well known “<a href="http://wso2.org/library/articles/2012/09/get-cup-coffee-wso2-way/" target="_blank">How to GET a Cup of Coffee the WSO2 Way</a>” integration scenario.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Following are some of the key parts of that scenario.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<ul style="font-weight: normal; text-align: left;">
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Exposing a REST API for a SOAP service through ESB</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">JSON Handling</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">XSLT transformations</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">User authentication through Oauth</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">JMS Message Stores and Message Processors</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Content based routing</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Protocol switching </span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Many other <a href="http://www.eaipatterns.com/eaipatterns.html" target="_blank">EIP patterns</a> like Message cloning/Iteration/aggregation</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Integration with Data services</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Integration with Message brokers</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Sending Email notifications</span></b></b></li>
<li><b><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Sending Tweets</span></b></b></li>
</ul>
<b><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">We managed to implement all above scenarios using ESB 4.6.0.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">That indicates how well the default Pass-through Http transport behaves for both content aware and content unaware scenarios.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Some of the minor but very useful improvements done in 4.6.0 is yet hidden under the shadow of this huge performance improvement.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Callout mediator has improved significantly. Now Callout mediator supports following features.</span></b><br />
<ul style="font-weight: normal; text-align: left;"><b>
<li><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Can specify a security policy to invoke secured services</span></b></li>
<li><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Has an option to specify different security policies for inbound and outbound paths</span></b></li>
<li><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Can specify an Address Endpoint instead of the service url</span></b></li>
<li><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Support sending soap headers</span></b></li>
<li><b id="internal-source-marker_0.8669989590998739" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Support sending transport headers</span></b></li>
</b></ul>
<b>
<span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Deploying API configurations from CAR files is now supported in this release.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">These facts clearly indicates that WSO2 ESB 4.6.0 release is not just about performance. </span></b></div>
Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-86294195524050239492013-01-28T22:10:00.002+05:302013-01-28T23:22:39.724+05:30[WSO2 ESB] Enable XPath 2.0<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
XPath 2.0 support is available in WSO2 ESB 4.5.0 and later versions.<br />
<br />
To enable XPath 2.0 functions, we have to uncomment following entry in the synapse.properties file.<br />
<div style="text-align: center;">
<span style="font-family: arial, FreeSans, Helvetica, sans-serif; font-size: 14px; line-height: 20px;"><i>synapse.xpath.dom.failover.enabled=true</i></span></div>
<br />
synapse.properties file is located at $ESB_HOME/repository/conf directory.<br />
After enabling xpath 2.0, you will able to use xpath functions like "<i>codepoint-equal()</i>" in your synapse configuration.<br />
<br />
If you are using synapse specific xpath functions like "get-property()" within a xpath 2.0 function you have to use them with the prefix "syn".<br />
<br />
Follwoing is an example for a such usage.<br />
<br />
<pre class="xml" name="code"><property expression="codepoint-equal(syn:get-property('propertyA'),syn:get-property('propertyB'))" name="ComparisonResult" scope="default" type="STRING">
</property>
</pre>
<br />
Above function uses "codepoint-equal()" xpath 2.0 function to compare two properties.
</div>
</div>
</div>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com0tag:blogger.com,1999:blog-2166252684212092038.post-85838453156071729782013-01-28T00:43:00.000+05:302014-02-19T09:58:18.254+05:30[WSO2 ESB] Sending SMS Alerts for failures<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<link href="https://sites.google.com/site/mytecheyehelper/syntaxhighlighter-css" rel="stylesheet" type="text/css"></link>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8qUuC76QJZ4ohS9PeBYfZ8_spwml-aMeb188OlThjMxUbcsyguwx6fxV0quTIcTDoYPnLFfhohB8l0d39AH80oSJYZBii47pzRbjtre1nXrRHAbYX0HiQMj28-pRQBepTiBjrrCL4iVU/s1600/esb-sms.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8qUuC76QJZ4ohS9PeBYfZ8_spwml-aMeb188OlThjMxUbcsyguwx6fxV0quTIcTDoYPnLFfhohB8l0d39AH80oSJYZBii47pzRbjtre1nXrRHAbYX0HiQMj28-pRQBepTiBjrrCL4iVU/s640/esb-sms.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b id="internal-source-marker_0.3805174531880766"><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">SMS Notifications has become a popular feature for many services.</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Isn't it nice if you can get a SMS Alert for a failure in ESB server?</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">In this post I am discussing how we can send a SMS Alert for a system failure in <a href="http://wso2.com/products/enterprise-service-bus/" target="_blank">WSO2 ESB</a>.</span><br /><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Required materials</span></b><br />
<b style="font-weight: normal;"><b style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></b>
<b id="internal-source-marker_0.3805174531880766" style="font-weight: normal;"><b id="internal-source-marker_0.3805174531880766" style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">* Axis2 SMS Transport binary.</span><span style="font-family: Arial; font-size: x-small; vertical-align: baseline; white-space: pre-wrap;"> </span></b><b id="internal-source-marker_0.3805174531880766" style="font-weight: normal;"><span style="font-family: Arial; font-size: x-small; vertical-align: baseline; white-space: pre-wrap;">(<a href="http://apache.osuosl.org//ws/commons/transport/1_0_0/axis2-transport-sms-1.0.0.jar" target="_blank">download from here</a>)</span></b></b><br />
<b id="internal-source-marker_0.3805174531880766" style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">The Axis2 SMS Transport enables SMPP protocol support for Axis2. It allows Axis2 to connect to a <a href="http://en.wikipedia.org/wiki/Short_message_service_center" target="_blank">SMSC</a> and send/receive sms. Apart from that it also has a GSM implementation which we can use to connect to a modem and send/receive sms over it.</span></b><br />
<b id="internal-source-marker_0.3805174531880766"><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Please visit <a href="http://ws.apache.org/commons/transport/sms.html" target="_blank">[1]</a> for more information.</span></b><br />
<b id="internal-source-marker_0.3805174531880766"><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">* JSMPP 2.1.0 binary </span><span style="font-family: Arial; font-size: x-small; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">(<a href="https://jsmpp.googlecode.com/files/jsmpp-2.1.0-bin.zip" target="_blank">download from here</a>)</span><br /><b id="internal-source-marker_0.3805174531880766"><span style="background-color: white; font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">JSMPP is a java implementation of SMPP protocol. It provides an API to communicate with a SMSC.</span></b><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Please visit <a href="http://code.google.com/p/jsmpp/" target="_blank">[2]</a> for more information.</span><span style="background-color: white; font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">* A SMSC Simulator</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">SMSC Simulator is an application which can be act like a <a href="http://en.wikipedia.org/wiki/Short_message_service_center" target="_blank">SMSC</a>. Using a simulator we can test our scenario without having access to a real SMSC. For the real production servers we have to use a real SMSC. A simulator is good enough for us for now. I am going to use logica SMSC Simulator for this tutorial. </span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Download and setup the Simulator following the instruction given at <a href="http://opensmpp.logica.com/CommonPart/Introduction/Introduction.htm#simulator" target="_blank">[3]</a>.</span><br /><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Now let's move on to the steps.</span><br /><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Step 1</span><br /><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Copy following libraries to $ESB_HOME/repository/components/lib directory.</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">axis2-transport-sms-1.0.0.jar</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">jsmpp-2.1.0.jar</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> </span><br /><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Step 2 </span><br /><span style="font-weight: normal;"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Enable SMS Transport by adding following configuration under “Transport Senders” section in axis2.xml.</span><br /><span style="font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">axis2.xml is located at $ESB_HOME/repository/conf/axis2 directory in WSO2 ESB 4.5.x.</span></b></div>
<br />
<pre class="brush: xml"> <transportsender class="org.apache.axis2.transport.sms.SMSSender" name="sms">
<parameter name="systemType"></parameter>
<parameter name="systemId">esb1</parameter>
<parameter name="password">esb123</parameter>
<parameter name="host">localhost</parameter>
<parameter name="port">2775</parameter>
<parameter name="phoneNumber">ESB1</parameter>
</transportsender>
</pre>
<br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Please refer to <a href="http://ws.apache.org/commons/transport/sms.html" target="_blank">[1]</a> to find more details on above parameters.</span><br />
<br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span>
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><b>Step 3</b></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Goto SMSC Simulator directory. You should have following 3 files at there.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">smpp.jar</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">smscsim.jar</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">users.txt</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Edit the users.txt file and add following name-value pairs to it.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">name=esb1</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">password=esb123</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">timeout=unlimited</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Note that ‘name’ is the ‘systemId’ parameter which we have specified at sms transport sender configuration.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Start SMSC Simulator by executing the following command.</span><br />
<div style="text-align: center;">
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><i>java -cp smpp.jar:smscsim.jar com.logica.smscsim.Simulator</i></span></div>
<div style="text-align: center;">
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br /></div>
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">You will see a screen like follows.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA2l-DZCLnDJCVrYjc3UdQ4p03a1TmU6N9YasspBe8PYpRisAx3mrqbY5PHln7djLwPZbgGbbUlj-SOYLP51vQqI227ccGhmDIWzqpHaHlTHMChzkgKbGFn_V3ZNCQPW4B84EEJUPpvBc/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA2l-DZCLnDJCVrYjc3UdQ4p03a1TmU6N9YasspBe8PYpRisAx3mrqbY5PHln7djLwPZbgGbbUlj-SOYLP51vQqI227ccGhmDIWzqpHaHlTHMChzkgKbGFn_V3ZNCQPW4B84EEJUPpvBc/s1600/1.png" /></a><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Enter 1 for the prompt to start simulation.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Enter 2775 as the port number. Note that it is equal to the port which we specified in sms transport sender configuration.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">You will see the “Starting listener... started.” log on the console.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Now leave the SMSC Simulator running and let’s go back to configure the ESB server.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<b id="internal-source-marker_0.3805174531880766"><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Step 4<span style="font-weight: normal;"> </span></span></b><br />
<b><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><span style="font-weight: normal;"><br /></span></span></b>
<span style="font-family: Arial; font-size: 16px; white-space: pre-wrap;">Start the ESB server and create a proxy service with the following configuration.</span><br />
<pre class="brush: xml"><proxy name="StockQuoteProxy" startonload="true" trace="disable" transports="https http" xmlns="http://ws.apache.org/ns/synapse">
<target>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService">
</address>
</endpoint>
<outsequence>
<send>
</send></outsequence>
<faultsequence>
<payloadfactory>
<format>
<smsbody>$1</smsbody>
</format>
<args>
<arg expression="fn:concat('Alert..! Error In StockQuoteProxy, ',get-property('ERROR_MESSAGE'))">
</arg></args>
</payloadfactory>
<send>
<endpoint>
<address uri="sms://94777179968">
</address>
</endpoint>
</send>
</faultsequence>
</target>
</proxy>
</pre>
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; white-space: pre-wrap;">Let me describe the proxy service configuration in brief.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">This configuration is very much similar to the ESB sample 150 configuration <a href="http://wso2.org/project/esb/java/4.0.3/docs/samples/proxy_samples.html#Sample15" target="_blank">[4]</a>. The only difference is, this has a fault sequence specified.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Fault sequence is triggered whenever some failure occurs in the mediation flow.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Here at the fault sequence, we are constructing the message which is to be sent as a SMS using the payload factory mediator. </span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Error message is extracted and set to the sms body from the ERROR_MESSAGE property. </span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Finally message is sent over sms transport using an Address Endpoint having the following uri.</span><br />
<span style="font-family: Arial; font-size: 16px; text-align: center; white-space: pre-wrap;">sms://94777179968"</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">94777179968 is the phone number which sms has to be sent.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><b>Step 5</b></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Now let’s run and see how this scenario works.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Start the sample Axis2 server and deploy the SimpleStockQuoteService.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Please refer to <a href="http://wso2.org/project/esb/java/4.0.3/docs/samples_setup_guide.html#Starting" target="_blank">[5]</a> for find how to do it.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Now let’s execute the stock quote client by requesting for a stock quote on the proxy service as follows:</span><br />
<i style="font-family: Arial; text-align: center; white-space: pre-wrap;">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</i><br />
<div style="text-align: center;">
<span style="background-color: #efefef; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br /></div>
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Refer to <a href="http://wso2.org/project/esb/java/4.0.3/docs/samples_setup_guide.html#Using" target="_blank">[6]</a> to find more information on sample clients.</span><br />
<span style="background-color: #efefef; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">You will see the following log get printed on the Simple axis2 server console.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">samples.services.SimpleStockQuoteService :: Generating quote for : IBM</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">And following get printed on the sample client shell.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Stock price = $98.58846106288853</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">So that is the success case.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"><b>Step 6</b></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Now let’s stop the sample Axis2 server and execute the client again.</span><br />
<i style="font-family: Arial; text-align: center; white-space: pre-wrap;">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</i><br />
<div style="text-align: center;">
<br /></div>
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Since sample Axis2 server is not running, SimpleStockQuoteService will not be available at this moment. So the Endpoint will get suspended and the fault sequence will get executed.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">A sms containing the error message will be sent to SMSC server.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">You will see the following log get printed on the SMSC server.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; white-space: pre-wrap;">08:35:05 [sys] new connection accepted</span><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">08:35:05 [] client request: (bindreq: (pdu: 33 2 0 1) esb1 esb123 52 (addrrang: 0 0 ) ) </span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">08:35:05 [esb1] authenticated esb1</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">08:35:05 [esb1] server response: (bindresp: (pdu: 0 80000002 0 1) Smsc Simulator) </span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">08:35:05 [esb1] client request: (submit: (pdu: 204 4 0 2) (addr: 0 0 ESB1) (addr: 0 0 94777179968) (sm: msg: Alert..! Error In StockQuoteProxy, Connection refused or failed for : localhost/127.0.0.1:9000, IO Exception occured : Connection refused) (opt: ) ) </span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">08:35:05 [esb1] putting message into message store</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">08:35:05 [esb1] server response: (submit_resp: (pdu: 0 80000004 0 2) Smsc2001 ) </span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">In the SMSC command prompt enter 5 to view list of messages.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">You will see the sms sent from the ESB server as follows.</span><br />
<br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNKx8pdlUkm6Pt_mgeL1E_u6UPL8oYHluWsHG2MBQGCSHTP8g1G0e1Q6CW-wXa5yYG55q9lu592x9n_chbhwpSvttOJtu1i_oH6GBdsmgTM19iPeA5nGRU584JXGXxlVGQ5CqAQve2ClY/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNKx8pdlUkm6Pt_mgeL1E_u6UPL8oYHluWsHG2MBQGCSHTP8g1G0e1Q6CW-wXa5yYG55q9lu592x9n_chbhwpSvttOJtu1i_oH6GBdsmgTM19iPeA5nGRU584JXGXxlVGQ5CqAQve2ClY/s1600/3.png" /></a></div>
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">For this post I have used the SMPP implementation of Axis2 SMS Transport. You can use the GSM implementation of it also to test this. Please refer to blog post<a href="http://charithwiki.blogspot.com/2009/12/invoking-webservices-using-axis2-sms.html" target="_blank">[7]</a> written by Charith to find how to use GSM implementation. And also he has written a comprehensive post <a href="http://charithwiki.blogspot.com/2009/06/axis2-sms-transport.html" target="_blank">[8]</a> on Axis2 SMS transport.</span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[1] </span><a href="http://ws.apache.org/commons/transport/sms.html"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://ws.apache.org/commons/transport/sms.html</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[2] </span><a href="http://code.google.com/p/jsmpp/"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://code.google.com/p/jsmpp/</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[3] </span><a href="http://opensmpp.logica.com/CommonPart/Introduction/Introduction.htm#simulator"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://opensmpp.logica.com/CommonPart/Introduction/Introduction.htm#simulator</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[4] </span><a href="http://wso2.org/project/esb/java/4.0.3/docs/samples/proxy_samples.html#Sample150"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://wso2.org/project/esb/java/4.0.3/docs/samples/proxy_samples.html#Sample150</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[5] </span><a href="http://wso2.org/project/esb/javFa/4.0.3/docs/samples_setup_guide.html#Starting"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://wso2.org/project/esb/java/4.0.3/docs/samples_setup_guide.html#Starting</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[6] </span><a href="http://wso2.org/project/esb/java/4.0.3/docs/samples_setup_guide.html#Using"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://wso2.org/project/esb/java/4.0.3/docs/samples_setup_guide.html#Using</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[7] </span><a href="http://charithwiki.blogspot.com/2009/12/invoking-webservices-using-axis2-sms.html"><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://charithwiki.blogspot.com/2009/12/invoking-webservices-using-axis2-sms.html</span></a><span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">[8] </span><span style="color: #1155cc; font-family: Arial; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">http://charithwiki.blogspot.com/2009/06/axis2-sms-transport.html</span>
</div>
</div>
</div>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js" type="text/javascript"></script>
<script src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJava.js" type="text/javascript"></script>
</div>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com4tag:blogger.com,1999:blog-2166252684212092038.post-80816284806664994302011-04-28T18:12:00.009+05:302011-04-28T18:36:29.215+05:30GSOC 2011 and Eclipse ECF Salvo<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfsIwN0ieUBhS2TYyoN7uPmPRdbgklyYJ0Mm8htB93ZagJixGwkhGQccrMcsjRQJkMNATsy54ClgQfwn523LeVVWsr9XoDg2seASCDrl8CFboP52j7cBvti42mioFJGRi4DQW-wgcPSwI/s1600/350px-Gsoc_2011_logo.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 250px; height: 150px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfsIwN0ieUBhS2TYyoN7uPmPRdbgklyYJ0Mm8htB93ZagJixGwkhGQccrMcsjRQJkMNATsy54ClgQfwn523LeVVWsr9XoDg2seASCDrl8CFboP52j7cBvti42mioFJGRi4DQW-wgcPSwI/s400/350px-Gsoc_2011_logo.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5600615750391646914" /></a><br /><br />I got selected for the <span style="font-weight:bold;">Google Summer of code</span> this year. We have 27 students from University of Moratuwa. 23 out of those 27 are from the Department of Computer Science and Engineering. I submitted three proposals for three mentoring organizations (The Eclipse Foundation, Universal Subtitles and Creative Commons). I am very happy that all three proposals got accepted by the respective organizations. I gave my preference to the Eclipse Foundation. “ECF Salvo, UI Integration in the workbench” is the title of the project.<br /><br /><br /><br /><span style="font-weight:bold;">ECF: Salvo, the Eclipse NNTP/Newsreader Project<br />UI Integration in the workbench</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYr0L-uHMoQ27RbT5yoj2KAe61JeCpFsLhMosO5OL-BI-C4-Ixbu8HMKfEVPcoC_Zt2cXbmRSD5KihmxzUmCdFMLMeVHe4suPL3U87YmlP7rVPNfcmTQTO0l9ONwKaK3delg9wFbjCJpQ/s1600/splash.bmp"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 250px; height: 150px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYr0L-uHMoQ27RbT5yoj2KAe61JeCpFsLhMosO5OL-BI-C4-Ixbu8HMKfEVPcoC_Zt2cXbmRSD5KihmxzUmCdFMLMeVHe4suPL3U87YmlP7rVPNfcmTQTO0l9ONwKaK3delg9wFbjCJpQ/s400/splash.bmp" border="0" alt=""id="BLOGGER_PHOTO_ID_5600614759563944514" /></a><br /><br /><span style="font-weight:bold;">The Salvo Project</span><br />The Salvo project can be used to communicate through newsgroups. It provides an underlying decoupled API to access news servers and provide offline storage of newsgroup articles.<br /> <br />Salvo can be used for accessing newsgroups and posting and reading articles. Several enhancements, not found in traditional newsreader programs have been implemented in Salvo such as subject highlighting for easy recognition of thread participation and offline reading.<br /><br /><span style="font-weight:bold;">UI Integration in the workbench</span><br />Currently Salvo is available as a RCP application. The main goal of this project is to provide the salvo functionality within the eclipse workbench. <br />Following are the key features in UI integration to eclipse workbench.<br /><br />1. Let the user ask a question right from the workbench<br />Users can ask questions from experts directly from the eclipse workbench rather than going outside (to a web browser) the eclipse IDE. This is a value added feature for the Eclipse IDE.<br /><br />2. Provide a pop up and a status bar notification when a reply is received.<br />This feature will allows the eclipse user to more focus on their work with the eclipse IDE reducing the overhead of going outside the IDE and check for replies.<br /><br />3. Provide a view which displays digests of all the articles that are of the interest of user.<br />This view contains,<br />All the recent articles <br />Replies to threads that the user participates in<br /><br />4. Provide a perspective for Salvo in eclipse workbench.<br />Whenever user wants to browse through articles he/she can simply switch to that perspective. And users can switch back to their working environment by simply changing the perspective.<br /><br />5. Enable a way for people to create an eclipse user id within the workbench.<br /> This feature makes it very easy for the eclipse user to get a userid and a password for accessing the newsgroups and bugzilla.<br /><br />6. Provide a way for other projects to hook their newsgroups into Salvo.<br />This will allows other projects to hook their newsgroup into the Salvo by using the exposed extension point. The extension point would make it possible for other projects to connect the projects namespace to the projects newsgroup.<br /> When a view or an editor of a particular project is active and if the user selects the “Ask a question” option from the workbench, salvo automatically figures out the newsgroup to post the question.<br /><br />More information of this project is available at <a href="http://wiki.eclipse.org/Newsreader/Salvo_UI_Integration_in_the_workbench">http://wiki.eclipse.org/Newsreader/Salvo_UI_Integration_in_the_workbench</a>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com3tag:blogger.com,1999:blog-2166252684212092038.post-89332680366557916862011-04-17T01:08:00.007+05:302011-04-17T01:17:57.966+05:30Make your favorite add-on compatible with Firefox 4Last month Mozilla released the version 4 of their Firefox web browser. Even though it has many exciting features, one of the key issues that the users has to face in upgrading to this new version is most of their favorite add-ons are not compatible with the new version. Some users hesitate to use this new version simply because of this reason. So I decided to write this post to address the people who are having that issue.<br /><br />Follow the following steps to make your add-on compatible with FF4.<br /><br />1. Download the extension file (.xpi file)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN3ytEdibXJxAXoktBhZtgLmJcRltvCW59IJ9q0-gHGHIeed4q0pvggW7FWugdsWv_i9AcXrXaR2SHB6UabITs8BgAjurIsSZAoOyrKoluUGwzbyngDafJbVp7tjOLuKqCWnBkthhrQY/s1600/1.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 112px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN3ytEdibXJxAXoktBhZtgLmJcRltvCW59IJ9q0-gHGHIeed4q0pvggW7FWugdsWv_i9AcXrXaR2SHB6UabITs8BgAjurIsSZAoOyrKoluUGwzbyngDafJbVp7tjOLuKqCWnBkthhrQY/s400/1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5596268585309916930" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg28rW5761h2kIb8VrMedx3RN6j6J-9hMBoCZSA0FwbcFdAC_HcUDUStY1l3vwttmqbyyNBK8Hl5C84fAVFo5yRarrILrN7dx4A_Mxk5mcGurL5QBGnkSeKvZhwwz2xGr7L5uRXL5_G2yE/s1600/2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 219px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg28rW5761h2kIb8VrMedx3RN6j6J-9hMBoCZSA0FwbcFdAC_HcUDUStY1l3vwttmqbyyNBK8Hl5C84fAVFo5yRarrILrN7dx4A_Mxk5mcGurL5QBGnkSeKvZhwwz2xGr7L5uRXL5_G2yE/s400/2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5596269089520648018" /></a><br /><br />2. Open the downloaded .xpi file using an archiving tool.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS3xTlA_UwkhXooRZTyWLKTT_j8xVE1XHcCyb1pRLhOMnBC_Sxuw9r7SKtNCLv_Nmt_dh5DcH_DFgLh5X1jQRrpFxhEZhrMAVbZEwEEtJPeJ84A8SQGzNlk87sHh1-i8Fac92aO1a_gHs/s1600/3.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 236px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS3xTlA_UwkhXooRZTyWLKTT_j8xVE1XHcCyb1pRLhOMnBC_Sxuw9r7SKtNCLv_Nmt_dh5DcH_DFgLh5X1jQRrpFxhEZhrMAVbZEwEEtJPeJ84A8SQGzNlk87sHh1-i8Fac92aO1a_gHs/s400/3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5596269321147860962" /></a><br /><br />3. In the archive locate the install.rdf file and open it using a text editor.<br />4. Locate the maxVersion tag. In the example image it is shown in red color. <br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgix-PVsaAbzZIMS0uJB6i3v0nbzIz9ew-chYlPDx9igapXlY6E2GvGPCSwjQaF_mp0W0KCWUNXPJS1kIokYrGq7jVbuUqTzd7OgiG1i-Qs-zjqSODKwB8S8BhvwxSh4PqdtqoNsWuN2a0/s1600/4.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 211px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgix-PVsaAbzZIMS0uJB6i3v0nbzIz9ew-chYlPDx9igapXlY6E2GvGPCSwjQaF_mp0W0KCWUNXPJS1kIokYrGq7jVbuUqTzd7OgiG1i-Qs-zjqSODKwB8S8BhvwxSh4PqdtqoNsWuN2a0/s400/4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5596269499919178466" /></a><br /><br />5. Change the maxVersion to 4.0.* or to a higher version.<br /><br />6. Save the file and update the archive.<br /><br />7. Now we are ready to go.<br /> Drag and drop the modified .xpi file to Firefox window and install it.Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com5tag:blogger.com,1999:blog-2166252684212092038.post-50879557986310052962011-03-31T07:00:00.005+05:302011-03-31T07:21:10.174+05:30qsFOX and quickProxy now available for Firefox 4Due to exams, projects, etc. I couldn’t find time to develop these extensions. So currently qsFOX is not available in the Mozilla addon site. I got many e-mails from qsFOX users requesting to make it available again.<br /><br />I made both qsFOX and quickProxy compatible with Firefox 4.<br />I have hosted it in the qsFOX home page. So you can download it from there.<br /><br /><a href="http://downloads.mozdev.org/qsfox/qsfox.xpi">http://downloads.mozdev.org/qsfox/qsfox.xpi</a> <br /><br />After hosting the extension in the home page I did a google search on "qsFOX". First hit is to the qsFOX home page. So qsFOX users can now download qsFOX by googling for "qsFOX". <br />And I can see that qsFOX has listed on the brothersoft as well.<br /><br />I will make it available in the Mozilla addon site as soon as possible.Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com3tag:blogger.com,1999:blog-2166252684212092038.post-5002059195972468652010-05-03T22:34:00.006+05:302010-05-03T23:01:52.727+05:30Colombo Ride 3DThe next version of the famous Sri Lankan Mobile game Colombo Ride will be released soon.<br />This new version is called Colombo Ride 3D.<br />The following video is a trailer of Colombo Ride 3D.<br /><br /><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/S2l0-X9RGcg&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/S2l0-X9RGcg&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object><br /><br />This will going to be a new experience for the Sri Lankan Mobile game lovers.<br />Colombo Ride 3D is developed by the Gamos Technology Solutions (GTS)<br /><br />With the release of the Colombo Ride 3D, they are organizing a competition allowing Colombo Ride fans to win prizes. <br />More information can be found at <a href="http://www.games.lk/competition">http://www.games.lk/competition</a>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com1tag:blogger.com,1999:blog-2166252684212092038.post-19423261397326684282010-05-02T08:48:00.011+05:302010-05-02T09:30:25.524+05:30Move Control box back to right side in Lucid Lynx<span style="font-size:130%;">When you install Lucid Lynx, a significant different we can see is the control box (min,max,close buttons) has moved to the left side of the title bar.<br /></span><p style="margin-bottom: 0in;"><span style="font-size:130%;">For me this is very annoying. I guess most of you feel the same.</span></p><p style="margin-bottom: 0in;"><span style="font-size:130%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzRQSTQ6pZt_gfwFYbi2pJtxQleIde9Z1DgHeZQogqo_F_gKfCknWVrwTbbnW5k8jUgu0keXzMaqHrIjJsvgkJH3YgxlzC64_eQutRSYI2cicGMdvXcw0PkOW3fuE0VRrJ7apU0SMzIWs/s1600/before.jpe"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 210px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzRQSTQ6pZt_gfwFYbi2pJtxQleIde9Z1DgHeZQogqo_F_gKfCknWVrwTbbnW5k8jUgu0keXzMaqHrIjJsvgkJH3YgxlzC64_eQutRSYI2cicGMdvXcw0PkOW3fuE0VRrJ7apU0SMzIWs/s320/before.jpe" alt="" id="BLOGGER_PHOTO_ID_5466513444836100434" border="0" /></a></span><span style="font-size:130%;"><br /></span></p><p style="margin-bottom: 0in;"><span style="font-size:130%;">If you want to relocate that into right hand side, you can select an old theme.<br /></span></p><p style="margin-bottom: 0in;"><span style="font-size:130%;">There is an another way you can do it by without changing the theme.<br /></span></p><p style="margin-bottom: 0in;"><span style="font-size:130%;">This is how we can do that.</span></p> <p style="margin-bottom: 0in;"><span style="font-size:130%;"><br /></span></p> <ol><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">Press <b>ALT+F2</b> to get run application dialog box</span></p> </li><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">Type <b>gconf-editor</b> and press <b>Run</b> to get Configuration Editor</span></p> </li><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">In configuration editor goto apps -> metacity -> general</span></p> </li><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">Find button_layout.</span></p> </li><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">You will see the current value of the button layout is “close,minimize,maximize:”</span></p> </li><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">Change that to “:minimize,maximize,close”</span></p> </li><li><p style="margin-bottom: 0in;"><span style="font-size:130%;">You will experience the change instantly <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjco2g4GmVqgVh8Dc_rRut8B-JybX9oWyePuhGOA1NP8E013b0BFoDQkjfFaK2UEEZqcT_U5sSnUUoBizXQM2XGzxusmxYgpjltBWUQmhILC8VL2l2vEphsQI4-ilUbReOmTWvTpvQSME/s1600/after.jpe"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 210px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjco2g4GmVqgVh8Dc_rRut8B-JybX9oWyePuhGOA1NP8E013b0BFoDQkjfFaK2UEEZqcT_U5sSnUUoBizXQM2XGzxusmxYgpjltBWUQmhILC8VL2l2vEphsQI4-ilUbReOmTWvTpvQSME/s320/after.jpe" alt="" id="BLOGGER_PHOTO_ID_5466513786905890978" border="0" /></a></span></p></li></ol><span style="font-size:130%;"><br /><br /><br /><br /></span><p style="margin-bottom: 0in;"><span style="font-size:130%;"><br /></span></p>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com1tag:blogger.com,1999:blog-2166252684212092038.post-32768372264988402352009-12-21T00:53:00.008+05:302010-05-02T09:31:54.036+05:30Mobile Partner Redialer<span style="font-size:130%;">It seems like every mobile broadband (HSPA) connection in Sri Lanka has a very poor Quality of Service.<br />Initially I used a Dialog HSPA connection.<br />Due to their poor service recently I switched to Mobitel which was considered as a far better connection compared to Dialog.<br />But now things have gone wrong again. Mobitel has become a very unreliable connection. Mobitel users cannot say in idle.<br />It seems like they are disconnecting the idle users in order to accept new users.<br />If we want to get connected again, we have to keep pressing redial button for 10-15 times. This has become a pain.<br /><br />I really hate this redialing thing. So I decided to write a small script to automate this.<br />I’m using a Huawei E220 HSPA modem with the Mobile Partner Software.<br /><br />I share this small script with you hoping someone will find it useful.<br /><br />This small program will run in background and keep redial for you (initially you have to press the connect button manually).<br /><br />You can just wait and watch until it get connected.<br /><br />This will consume some considerable amount of CPU (due to an endless loop), so make sure that you pause the script when you are not using it.<br /><br />Demo Video<br /><br /><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/5VTrS6HEO60&hl=en_US&fs=1&"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/5VTrS6HEO60&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"></embed></object><br /><br /><br /><a href="http://www.mediafire.com/file/4gzozwmtdjo/MobilePartnerRedialer.exe">Download from here</a><br /><br /><br />Note – If someone can create a similar thing for Ubuntu it will be greatly appreciated.</span>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com20tag:blogger.com,1999:blog-2166252684212092038.post-89148278547471911722009-12-16T07:21:00.006+05:302009-12-16T07:48:54.512+05:30qProxy - quick Proxy<span style="font-size:130%;"><span style="font-family: times new roman;">This is a very simple extension for Mozilla Firefox which has the functionality of enable/disable proxy in a single click.</span><br /><span style="font-family: times new roman;">Actually I developed this extension for my personal usage. I use two connections to connect to the internet. One is the Mobitel HSPA connection (no proxy) and the other one is University Wireless network (proxy enabled). </span><br /><br /><span style="font-family: times new roman;">Every time when I want to switch between networks I have to change the proxy settings.</span><br /><br /><span style="font-family: times new roman;">Tools -> Options -> Select Advanced Section -> Select Network Tab -> Connection Settings -> Select No proxy or Manual Proxy</span><br /><br /><span style="font-family: times new roman;">For me going through this series of steps each and every time to change the network is annoying.</span><br /><span style="font-family: times new roman;">So I decided to create a small extension to enable/disable proxy in a single click.</span><br /><br /><span style="font-family: times new roman;">I didn’t put much effort to build this one. It cost me about 30min to come up with this solution.</span><br /><br /><span style="font-family: times new roman;">For the first time you have to set the proxy settings at the Connection Settings window.</span><br /><br /><span style="font-family: times new roman;">After installing qProxy an icon which indicates current proxy status will appear on the status bar. You can simply click on that icon to enable/disable proxy. </span><br /><br /></span><p style="font-family: times new roman;" class="MsoNormal"><span style="font-size:130%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAf_ruM8p5tFtdazWIoTbpWvCXQB1AE5qd6sp0yym5jE0HdZj86J2bAyoeZPEDJiUkcDychkjcHvgBeeUU3n1LRUE8MucfRs-57tnqUI7pBEBhCIdBXua6zCBKwS7TNnOjt3Ll9RKPLTM/s1600-h/screenshot.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 206px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAf_ruM8p5tFtdazWIoTbpWvCXQB1AE5qd6sp0yym5jE0HdZj86J2bAyoeZPEDJiUkcDychkjcHvgBeeUU3n1LRUE8MucfRs-57tnqUI7pBEBhCIdBXua6zCBKwS7TNnOjt3Ll9RKPLTM/s320/screenshot.jpg" alt="" id="BLOGGER_PHOTO_ID_5415646205790867874" border="0" /></a></span></p><p style="font-family: times new roman;" class="MsoNormal"><span style="font-size:130%;"><br /></span></p><p style="font-family: times new roman;" class="MsoNormal"><span style="font-size:130%;"><a href="https://addons.mozilla.org/en-US/firefox/addon/54908/">Download from here</a><br /></span></p>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com2tag:blogger.com,1999:blog-2166252684212092038.post-11405604308551181322009-12-14T19:52:00.017+05:302009-12-14T20:56:40.110+05:30qsFOX - My Level 3 Project<span style=";font-family:times new roman;font-size:130%;" ><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://addons.mozilla.org/en-US/firefox/addon/53146"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 155px; height: 155px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4QUQxaBM3r4_3OgSe3TIw7EXNdJkHXmOL1Agve6ctjrcFsF0CsGOyX46rDVWN-ro09fYl5SgMQapPxYz-8kb3c90TtD2p-dPvjcbGlinXCJodQF6mY-8M07hCbk6H42CRv_4EkLR_gx8/s320/qsfox.jpg" alt="" id="BLOGGER_PHOTO_ID_5415100387155651106" border="0" /></a><br /></span><span style=";font-family:";font-size:130%;" ><br /></span> <p style="font-weight: bold; color: rgb(51, 102, 255);font-family:georgia;" class="MsoNormal"><span style="font-size:130%;">Project Description</span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"> (skip this part if you have already gone through it at <a href="http://qsfox.mozdev.org/">http://qsfox.mozdev.or</a></span><span style="font-size:130%;"><a href="http://qsfox.mozdev.org/">g/</a>)<o:p></o:p></span></p> <p style="font-family:georgia;"><span class="infoheader" style="font-size:130%;">qsFOX is an extension for Mozilla Firefox which enables Sinhala Unicode Reading and writing capability for Firefox. </span><span style="font-size:130%;">Most of the machines at internet cafes and some labs do not have Sinhala Unicode installed.</span></p> <p style="font-family:georgia;"><span style="font-size:130%;">In order to install Sinhala Unicode we have to go through series of steps which takes too much of time. And lack of privileges makes it even tough for the normal users.<o:p></o:p></span></p> <p style="font-family:georgia;"><span style="font-size:130%;">So it is always good to have a quick way of enabling Unicode witho</span><span style="font-size:130%;">ut administrative user privileges since time is a highly considerable factor for the users who browse internet in those places.<o:p></o:p></span></p> <p style="font-family:georgia;"><span style="font-size:130%;">Even though it is possible to read Sinhala Unicode text using a small trick, not being able </span></p> <p style="font-family:georgia;"><span style="font-size:130%;">to write in Sinhala has become a great problem for the users who work with Sinhala Unicode (ex. Sinhala blog</span><span style="font-size:130%;">gers).<o:p></o:p></span></p> <p style="font-family:georgia;"><span style="font-size:130%;">From qsFOX I have given a solution for this by providing both reading and writing capabilities in Sinhala Unicode for Firefox. <o:p></o:p></span></p> <p style="font-family:georgia;"><span style="font-size:130%;">qsFOX comes as an extension for Firefox. Here I have developed the standard Wijesekara Sinhala keyboard. <o:p></o:p></span></p> <p style="font-family:georgia;"><span style="font-size:130%;">So I hope it will be a great tool for the Sinhala Bloggers and Blog readers who are having problems with working in Sinhala in those constraint environments. </span></p> <p style="font-family:georgia;"><span style="font-size:130%;">And there is an option for those who like to use the Phonetic style (singlish) keyboard. <o:p></o:p></span></p> <p style="font-family:georgia;"><span style="font-size:130%;">User will be provided a UI with useful information (ex. Keyboard Layout).</span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><span style="font-weight: bold; color: rgb(51, 102, 255);">The Story</span><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">For level 3 course module Programming Project (3200) we were asked to develop a plug-in for an existing code base (like Firefox, Thunderbird, Open Office, etc).</span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"> Initially I thought to develop an extension to record statistics of download</span><span style="font-size:130%;">s/uploads. I asked some of my friends (Bhanu, Pahan, Nuwan) for a project idea.<br /></span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Pahan came up with this great idea (I believe it is great) of developing an extension which allows users to use Sinhala Unicode in a constraint environment (without administrative privileges) which was in his mind for a long period of time. He has already created a <a href="http://blog.pahans.com/2009/07/%E0%B7%83%E0%B7%92%E0%B6%82%E0%B7%84%E0%B6%BD-%E0%B7%83%E0%B6%B8%E0%B6%9F%E0%B7%92%E0%B6%B1%E0%B7%8A-firefox-portable-3-5/">portable Firefox</a> with Sinhala reading capability which has some draw backs. He explained me how his portable Firefox works.<br /></span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"> My project proposal got approved and I started the development. Initially part of the project is full of documents. Level 3 project runs very much similar to a real world project. Software Engineering course module which is conducted by Dr. Shahani Weerawarana was very helpful to gain knowledge to do the initial part of the project. <o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Initially I had to put some effort to learn JavaScript and XUL (XML User Interface Language) since I am very new to those two technologies. Luckily there are lots of online resources availa</span><span style="font-size:130%;">ble.<br /></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">First I developed the Wijesekara Keyboard functionality. It was not that easy as I thought. </span><span lang="SI-LK" style="font-size:130%;">ෙ(</span><span style="font-size:130%;">”Kombuwa”</span><span lang="SI-LK" style="font-size:130%;">)</span><span lang="SI-LK" style="font-size:130%;"> </span><span style="font-size:130%;">caused series of troubles to me</span><span style="font-size:130%;"> :-).</span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"> Lack of familiarity with the Wijesekara keyboard layout became a problem. Once again I got the help from Pahan to test the Wijesekara keyboard. He chats with me in Sinhala by usin</span><span style="font-size:130%;">g the extension to identify bugs.<br /></span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Finally I succeeded in creating the entire Wijesekara Keyboard layout including “Rakaransha” and “Bendi Akshara”.<o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Implementing Sinhala reading functionality was a challenge. I created my own XPCOM component in C++ to access windows API. I am not going to describe more on that.</span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">But you can get some idea from the following Logical view.</span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJrWvKcRNNfSBg6vj5Ps_UEUT6ORAdOvTRa8tWvhn2gl8NqTxy4cbYXsFk8qmEkl8C9oTDgx6QqDmHox4_YesiH_cx21VGTzF_JHSWPQi0qVO6c0iMuercxHMmnkdkNGZpv0cTeOlr12Y/s1600-h/qsFOX1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 232px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJrWvKcRNNfSBg6vj5Ps_UEUT6ORAdOvTRa8tWvhn2gl8NqTxy4cbYXsFk8qmEkl8C9oTDgx6QqDmHox4_YesiH_cx21VGTzF_JHSWPQi0qVO6c0iMuercxHMmnkdkNGZpv0cTeOlr12Y/s320/qsFOX1.jpg" alt="" id="BLOGGER_PHOTO_ID_5415099828584692130" border="0" /></a></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><br /></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><br /></span><span style="font-size:130%;"><o:p></o:p></span></p> <p style="color: rgb(51, 102, 255); font-weight: bold;font-family:georgia;" class="MsoNormal"><span style="font-size:130%;">GUI</span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGz-KtGiuQOi6lKj-QLazrGlRndo9Moiz3u3x8wGoHqAUkoo41kUm_sD6uPRWDI_rlMiNOjl9LDh9_SwThL7g76t5Pc0mWRMcay7713XoVWWRDjyqUZF84myUXNZbUfqnkegV-4ezkCtU/s1600-h/screenshot1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 241px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGz-KtGiuQOi6lKj-QLazrGlRndo9Moiz3u3x8wGoHqAUkoo41kUm_sD6uPRWDI_rlMiNOjl9LDh9_SwThL7g76t5Pc0mWRMcay7713XoVWWRDjyqUZF84myUXNZbUfqnkegV-4ezkCtU/s320/screenshot1.jpg" alt="" id="BLOGGER_PHOTO_ID_5415100919410585474" border="0" /></a></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><br /></span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><br /></span><span style="font-size:130%;"><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">I think I am always good at GUI designing. I got some good feedbacks for the GUI and for the logo. I tried to make it attractive and user friendly. You can decide whether I am successful or not.<o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Finally I ended up all the development phases successfully on time. <o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">If you like to create Firefox extensions I can give you a small guidance according to my knowledge.<o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><a href="https://developer.mozilla.org/en">Mozilla Developer center (MDC)</a> is a good online resource to learn extension development.<br /></span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">And if you have any problems during the project you can get the help from the <a href="http://forums.mozillazine.org/">Mozillazine forum</a> members. I got a good support from them (most of the times they give code snippets)<o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><span style="font-weight: bold; color: rgb(51, 102, 255);">Credits</span><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><a href="http://blog.pahans.com/">Pahan Sarathchandra</a> for project idea, supportive ideas and testing (I can definitely say that if he is not there I will not get this chance to contribute to Sinhala Blogosphere. He deserve a very big credit for his concept and for the support he gave me throughout the project.)<o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Creators of <a href="http://www.ucsc.cmb.ac.lk/ltrl/services/feconverter/t1.html">Unicode Real Time converter </a><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Creators of </span><span style="font-size:130%;"><a href="http://siyabas.lk/files/FM-MalithiUW46.ttf">Malithi Web Font</a></span><span style="font-size:130%;"><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;">Authors of articles at <a href="http://siyabas.lk/">http://siyabas.lk/</a><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><span style="color: rgb(255, 0, 0);">Still there may be some unidentified bugs in this extension. If you find a serious bug please let me know.</span><o:p></o:p></span></p> <p style="color: rgb(51, 51, 255); font-weight: bold;font-family:georgia;" class="MsoNormal"><span style="font-size:130%;"><a href="https://addons.mozilla.org/en-US/firefox/addon/53146">And please add your reviews here</a></span></p><p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><br /><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><o:p> </o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="line-height: 115%;font-size:130%;" ><o:p> </o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="line-height: 115%;font-size:130%;" ><o:p> </o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="line-height: 115%;font-size:130%;" ><o:p> </o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="line-height: 115%;font-size:130%;" ><o:p> </o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal" style="font-family:georgia;"><span style="font-size:130%;"><o:p> </o:p></span></p>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com19tag:blogger.com,1999:blog-2166252684212092038.post-16293491070690704032009-06-28T22:44:00.016+05:302009-12-14T23:11:25.845+05:30A simple trick to protect OTHERS from your flash drive<p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">As you all know most of the viruses which spread through Flash drives use the <b style="">autorun.inf</b> file to auto execute it. </span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">You can do a simple registry tweak or you can use software like autorun eater to block the execution of the instructions on this file. Here I’m not going to describe that. What I’m going to explain here is how to stop your flash drive becomes a carrier for viruses. </span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">In here I`m using a feature of windows which is rarely noted by users</span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><b style=""><i style="">You can`t create a file and a folder which has the same name in the same location (directory).</i></b></span></p><p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><b style=""><i style=""><br /></i></b></span></p><p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEQWCrz9A1P0PEdLDSjWWDwOjyeMJzq0P98hEgM0RSrqeUI210wlvT9yvye4MGYyUFFR1R863535jKRNcAOtGoTypBkhn-WLoXPk-gk3cgwG2uE8axtz97iPUibb0g4wwCLb6VlF5jih0/s1600-h/pic1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 201px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEQWCrz9A1P0PEdLDSjWWDwOjyeMJzq0P98hEgM0RSrqeUI210wlvT9yvye4MGYyUFFR1R863535jKRNcAOtGoTypBkhn-WLoXPk-gk3cgwG2uE8axtz97iPUibb0g4wwCLb6VlF5jih0/s320/pic1.png" alt="" id="BLOGGER_PHOTO_ID_5352428669586644914" border="0" /></a><b style=""><i style=""><span style=""> </span><o:p></o:p></i></b></span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><br /></span></p><p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">Ex. You can`t create a file called isuru.txt while having a folder called isuru.txt in the same directory.</span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">So what you have to do is create a read-only folder called <b style="">autorun.inf </b>in the root of your flash drive.</span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><i style="">What if the virus is smart enough to delete the folder autorun.inf?<o:p></o:p></i></span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">For that let’s do a small trick.</span></p> <p style="font-style: italic;font-family:times new roman;" class="MsoNormal"><span style="font-size:130%;"><b style=""><a href="http://support.microsoft.com/kb/74496/en-us">MS-DOS Device Driver Names Cannot be Used as File Names</a></b></span></p><p style="font-style: italic;font-family:times new roman;" class="MsoNormal"><span style="font-size:130%;"><br /></span></p><p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv6572Zyoi1oOenxCU6S1qQgbcrkyIQOaMlPuwzmj3L6nObdk8yanlZkgHYqzwapvLuJtSIlANn8-xpRrrsZ1hVdQ7K0ET6_YneDJy3LihvSm8UXYKW86Z8pZ_HMo3t3Y35g8KhUbQxhQ/s1600-h/pic2.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 223px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv6572Zyoi1oOenxCU6S1qQgbcrkyIQOaMlPuwzmj3L6nObdk8yanlZkgHYqzwapvLuJtSIlANn8-xpRrrsZ1hVdQ7K0ET6_YneDJy3LihvSm8UXYKW86Z8pZ_HMo3t3Y35g8KhUbQxhQ/s320/pic2.png" alt="" id="BLOGGER_PHOTO_ID_5352428669736758354" border="0" /></a></span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><br /></span></p><p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">You can use this feature to prevent the deletion of the autorun.inf folder</span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">What you have to do is create folder called CON inside the autorun.inf folder using Linux or by executing the following commands in command prompt</span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">(x is your drive flash drive) </span></p> <p style="color: rgb(153, 51, 153);font-family:times new roman;" class="MsoNormal"><span style="font-size:130%;"><b style="">x:<o:p></o:p></b></span></p> <p style="color: rgb(153, 51, 153);font-family:times new roman;" class="MsoNormal"><span style="font-size:130%;"><strong><span style="">cd autorun.inf<o:p></o:p></span></strong></span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;"><strong style="color: rgb(153, 51, 153);"><span style="">md .\CON\</span></strong><b style=""><span style="color: rgb(153, 51, 153);">.</span><o:p></o:p></b></span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">The Folder CON cannot be deleted from windows. Therefore you are not allowed to delete autorun.inf folder.</span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">This will work for most of the viruses. But I can’t guarantee this will work for all the viruses. </span></p> <p class="MsoNormal" style="font-family:times new roman;"><span style="font-size:130%;">I wrote a simple batch file to do all above tasks. You can copy this file to root of your flash drive and execute it. <a href="http://www.mediafire.com/file/rvvjjgqbzwq/noautorun.bat">Get it from here.</a></span></p>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com7tag:blogger.com,1999:blog-2166252684212092038.post-59516461595312007442009-05-02T15:13:00.004+05:302009-05-02T15:21:53.301+05:30A Trick to identify INVISIBLE contacts in Gmail chatHere is a simple way to check whether a contact is really offline in Gmail Chat. Actually this uses a bug of invisible feature.<br /><br />First select the off the record option for the chat<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijp-wLUapNH9zba9E9eTdnSrZrIUf10T8CLgO6jRd-56_ocPZDnuRiMwhCiADIPYyG7UD2OPxKQaRQQ5k7CTCWvuUg1WKj8Oe-vR5awxrnRFgcZpkZjj8ewZ2PMr-q0KGcDADx3olxmk4/s1600-h/1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 242px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijp-wLUapNH9zba9E9eTdnSrZrIUf10T8CLgO6jRd-56_ocPZDnuRiMwhCiADIPYyG7UD2OPxKQaRQQ5k7CTCWvuUg1WKj8Oe-vR5awxrnRFgcZpkZjj8ewZ2PMr-q0KGcDADx3olxmk4/s320/1.jpg" alt="" id="BLOGGER_PHOTO_ID_5331161054445744690" border="0" /></a><br />Then type something and send it.<br />You will get a message (as shown on the picture below) if the contact is offline.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBAlUbBa0btKXNfcIFZRRxVW78EsM1AvD9umZ4LbXHp_-u1jfjSC4SqQS2Qf_VsY68xJ9qyBmbgu7lC8im0wWRpS7p2YuCutt0_zNmIdIzQze1vNU7_KTlskyz0-fAouXV6uTvCeEyLPA/s1600-h/2.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 221px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBAlUbBa0btKXNfcIFZRRxVW78EsM1AvD9umZ4LbXHp_-u1jfjSC4SqQS2Qf_VsY68xJ9qyBmbgu7lC8im0wWRpS7p2YuCutt0_zNmIdIzQze1vNU7_KTlskyz0-fAouXV6uTvCeEyLPA/s320/2.jpg" alt="" id="BLOGGER_PHOTO_ID_5331161057852724370" border="0" /></a><br />If the contact is invisible you won’t get the message.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDa2F5-3byrjUK9CrA363fdaxir1BCBiGFLDdb8S4nmO8QTLl7jyoBCX81xRwaUXYLbS4Q_VqcOTbW8AoDiWcLEe0V8wAChHEfrPPcLLtoqnSfUpREP5zHE-gtvHrnzu7XgSu9Ma4tdoI/s1600-h/3.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 222px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDa2F5-3byrjUK9CrA363fdaxir1BCBiGFLDdb8S4nmO8QTLl7jyoBCX81xRwaUXYLbS4Q_VqcOTbW8AoDiWcLEe0V8wAChHEfrPPcLLtoqnSfUpREP5zHE-gtvHrnzu7XgSu9Ma4tdoI/s320/3.jpg" alt="" id="BLOGGER_PHOTO_ID_5331161067690143138" border="0" /></a>Isuru Udanahttp://www.blogger.com/profile/18378348781470276621noreply@blogger.com12