rubiii/savon — Issue #248:  savon don't put attributes based on wsdl to request
Author: romagur
Created: 2011-12-17 21:18:14+00:00
State: open

I try to send soap request. I use wsdl: http://soap.direct.yandex.ru/wsdl/v4/. But savon don't put attributes based on wsdl to request.
When I use php SoapClient, attributes inserted automatically into request

$client = new SoapClient($wsdlurl,
array(
'trace'=> 1,
'exceptions' => 0,
'encoding' => 'UTF-8',
'local_cert' => $local_cert,
'passphrase' => ''
)
);
$params = array('param1','param2');
$result = $client->GetCampaignsList($params);

PHP request:

param1

param2

But in ruby Savon library attributes didn't insert into request

Savon.configure do |config|
config.log = true # disable logging
config.log_level = :info # changing the log level
config.logger = Rails.logger # using the Rails logger
end

client = Savon::Client.new do |wsdl, http|
wsdl.document = "http://soap.direct.yandex.ru/wsdl/v4/"
http.auth.ssl.cert_key_file = path_to_key_pem_file
http.auth.ssl.cert_file = path_to_cert_pem_file
http.auth.ssl.ca_cert_file = path_to_ca_cert_file
http.auth.ssl.verify_mode=:none
end

response = client.request :ns1, :get_campaigns_list do
soap.body = { :params => ['param1', 'param2'] }
end

Ruby request:

param1

param1