How to pass file to webservice into byte[] format

Hi All,

We are integrating Stellent Universal Content Mangement Application with our appliaction.

Stellent is Oracle’s product the they have published there webservices for integration. One of their service is acception file in array of byte[].
We are using pub.file.getFile() service to read file into bytes and mappting this output to their file parameter. But when we run our service it gives us error that file parameter cannot be empty. This error is returned by Stellent’s service, which means call is going properly only thing is file is not getting passed to webservice.

Can I directly pass output of getFile to any service, or do i need to convert it into another format? When checked the Content Type property of file parameter, i found it is 'base64Binary (http://www.w3.org/2001/XMLSchema)’ . So Do I need to convert it into base64Binary format and how?

Thanks & Regards,
Mayur

Hi All,

I have solved the problem. Just pasting here the solution for those who is also facing same problem.

To convert byte[] to base64String use pub.string:base64Encode service and pass output to webservice.

Thanks & Regards
Mayur