From: Khudadad Kazi Date: 2013-05-28T15:30:10+09:00 Subject: Re: Converting an xml file to byte array in ruby Thanks for the help Robert. I am really trying hard to understand the problem and to make it clear in my query as well. I used the above information about Base64 provided by you and I get a SOAP response (status 200) along with the request parameters which I provided. Robert Klemme wrote in post #1110295: > Well, but then it's a string, isn't it? Or what type is fileData? > (Btw. > in Ruby we usually use "file_data"). The WebService defines file_data parameter to be base64Binary, and I have the equivalent code in java as follows: FileInputStream fis = new FileInputStream(fileList[i]); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buff = new byte[1024]; for (int readNum; (readNum = fis.read(buff)) != -1;) { bos.write(buff, 0, readNum); } byte[] blob = bos.toByteArray(); I am investigating why I am getting a status 200 error. Thanks again for your time. I will post my findings as I work my way forward. -- Posted via http://www.ruby-forum.com/.