Binary file upload to IS via CAF Portlet

Hi;
We are using webmethods 9.9 platform. We have a requirement to let user upload binary file (jpeg, pdf) via MWS portlet and then store it as a blob or on file system in IS.

We built a simple portlet form using File Input control and then bind it to File Item. We then programmed command button invoke webservice in IS which expect byte array and filename as input and then write to file system using Bytes2File pub service.

The work files with txt or plain text files but it did not work on binary data such as images or word documents.

Your help is very much appreciated.