Merged the changes for AXIS2-4847 / AXIS2-5329 to the 1.6 branch.

git-svn-id: https://svn.apache.org/repos/asf/axis/axis2/java/core/branches/1_6@1594748 13f79535-47bb-0310-9956-ffa450edef68