From: shivakumar paramesh Date: 2011-07-29T14:43:07+09:00 Subject: get response from soap using curb in ruby I start working on ruby very recently. i written a small code for SOAP client request and response using curb gem. But i am getting some error in response XML. Code: require 'curb' c = Curl::Easy.new('http://api.abc.com/service.asmx?wsdl&apikey='+key) c.multipart_form_post = true c.http_post(Curl::PostField.content('SOAPAction', 'http://api.abc.com/GetServices')) c.http_post(Curl::PostField.content('Content-Type', 'application/soap+xml; charset=utf-8')) c.http_post(Curl::PostField.content('Content-Length', '200')) c.http_post(Curl::PostField.file('xml', '/path/data.xml')) puts c.body_str Error: Server was unable to process request. ---> Data at the root level is invalid. Line 1, position 1. Thanks in advance -- Posted via http://www.ruby-forum.com/.