Forgive me for asking that question literally just managed to solve it! In the search for solutions has been spent a lot of time and then I just leave the resolution of this issue here. The problem was that the default settings for
contentType="text/html"
in the system settings not specified Message Builder for this content type. In order that all would work to find a file {WSO2 ESB HOME}/repository/conf/axis2/axis2.xml
Find it section ( Message Builders ) So, in this section there is no handler for that content type. (if I was a developer WSO I would ask what that default handler but alas, in this situation, it is not suitable) And so, in this section you need to add a handler for our type of content
<messageBuilder contentType="text/html"
class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
so it will process the message as binary. But at the same time, it will not cause system crash.After this manipulation, you can safely use PayloadFactory as indicated above. It works for me! Maybe someone else would be useful. Thank you for your attention. Personal thanks Chanaka udaya for trying.