patched {https://wso2.org/jira/browse/ESBJAVA-3172}
Merge pull request #48 from dushansachinda/master

patched {https://wso2.org/jira/browse/ESBJAVA-3172}