From: Khudadad Kazi Date: 2013-05-28T01:50:39+09:00 Subject: Re: Converting an xml file to byte array in ruby OK. to be more specific, here is my method: def add_file_to_project(ticket,pid,fileName,fileData,srcId,targetIds,metadata=nil) require 'savon' received_path=@path client = Savon.client do wsdl received_path end message = {'Ticket' => ticket, 'ProjectID' => pid,'Filename' => fileName, 'FileData'=> fileData,'SourceLanguageID' => srcId, 'TargetLanguageIDs' => targetIds, 'Metadata' => nil, 'IsReferenceMaterial' => false, 'WebServiceType' => 'Publisher'} response = client.call(:add_file_to_project, :message => message) addFileToProjectResult = response.body[:add_file_to_project_response][:add_file_to_project_result] return addFileToProjectResult end where in fileData should be a base64Binary (to which i referred as a "byte array"). Now, rest of the parameters are Strings except for 'TargetLanguageIDs' which is an array. I just need to send a file in that fileData parameter. Please show how to achieve that when I do not put restrictions on any kind of files. -- Posted via http://www.ruby-forum.com/.