Showing posts from 2013

WSO2 ESB append full body to a POST parameter

When you have to invoke a back end service which can take only on parameter and you need to send your full soap envelop body as single post parameter you can use script mediator and payload factory mediator as following. I have an api which calls to "http://localhost:9000/services/SimpleStockQuoteService"  and response is received by the "second_sequence".
In the second_sequence response is processed and assign it single parameter using script mediator and payload factory.


<api xmlns="" name="StockQuoteAPI2" context="/stockquote_api">
   <resource methods="GET" uri-template="/view/{symbol}">
               <m0:getQuote xmlns:m0="http://services.samples">

SSL handshake failed: SSL error: Key usage violation in certificate has been detected

SVN causing problems in ubuntu

When I was checking out a code in a svn repository which can only connect through https, started giving me errors as following.

SSL handshake failed: SSL error: Key usage violation in certificate has been detected.

This is caused by a bug in the version of libneon, fortunately this is fixed in version 0.29.3. 

To fix the problem, please follow the steps

Uninstall the current libneon package: sudo apt-get remove libneon27Download the latest libneon package the required libssl dependency: sudo apt-get install libssl0.9.8Install the downloaded libneon package: dpkg -i libneon27_0.29.3-3_amd64.debMake the changes to symbolic links as described above: sudo mv /usr/lib/ /usr/lib/ sudo ln -s /usr/lib/ /usr/lib/

WSO2 ESB Stop suffix getting appended to endpoint.

When you are developing a synapse configurations, there can be some places where you do a POST request to rest end point from a proxy service. And you find that your end is get appended by some other part of the previous url end point which supposed to call the current proxy service.

You can get rid of it with this property mediator.

<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>

WSO2 ESB Script Mediator (Remove body of an soap envelop)

When you are implementing synapse configurations in WSO2 ESB (4.6.0), sometimes you might want to remove soap body. This happens to me when I was developing complex synapse configuration, which had lot of service chaining. The last of the service chaining was to call to a rest (GET) end point using rest api. Up to final call to rest api, everything seems to work perfect. But the last rest api call fails due to a soap envelop generated from service chaining. Simple solution was to remove the soap body from the envelop. then it worked perfectly as I expected.

This is the simple solution I used to remove the body from the soap envelop using script mediator.

<script language="js">

WSO2 ESB Dynamic End Point Resolution

From WSO2 ESB 4.7.0 onwards, support dynamic end point resolutions.

If you have multiple deployment environments (DEV, QA, Production), then you may end up having many endpoints and will have to change them once you migrate your synapse configs to other environment. As a simple solution for this time consuming problem (for Call out mediator and send mediator only), you can initialize end points as jvm parameters at the server start up.


SEND Mediator

<send>             <endpoint name="MyEp"                       template="endPointTemplete"                       uri="http://{}:{system.prop.bpm.stock.port}/services/SimpleStockQuoteService"/>          </send>
You have to create a endpoint template in order to use this feature for send mediator. When you start the ESB, you can initialize the {} and {system.prop.bpm.stock.port} by using JVM parameters as follows. And then those end points …


Are you in need of monitoring for your web application. Need to know more details than other analytic tools provide without a cost of performance. We have the best solution. WSO2 Application Server and WSO2 Business Activity Monitor.

In current wso2 application server (AS -5.1.0) does have capability of monitoring service statistics through wso2 business activity monitor (BAM -2.2.0). But yet it does not have the ability to monitor web applications statistics

In the next AS release (5.2.0) we have integrated the capability of monitoring web application statistics with BAM (2.3.0)

You may  follow the steps mentioned below to activate the monitoring.

Please download AS from here and BAM from here.

To start the AS you have to follow the steps below.Go to {AS_HOME}/repository/conf/ and open carbon.xmlLook for <offset>0</offset> and change it 1.Go to {AS_HOME}/repository/conf/etc/ and open bam.xml.Look for <WebappDataPublishing>disable</WebappD…