Thursday, April 19, 2012

[Rails] Issue with savon and ssl headers

Hi my problem is this i'm trying to write some rules for ssl connection
but i just can't write the attributes of some nodes.

Here is the code I wrote

soap.header = { "To" => "URL",
"Action" => "action",
"ReplyTo" => {"Address" => "URL"},
"MessageId" => "uuid,
"wsse:Security" => {"wsu:Timestamp" => {"wsu:Created" =>
"Time", "wsu:Expires" => "Time"}},
:attributes! => {"ReplyTo" => { "xmlns"=> "namespace"},"To"
=> { "xmlns"=> "namespace"},"Action" => {"xmlns"=> "namespace",
"xmlns:S" => "http://schemas.xmlsoap.org/soap/envelope/",
"S:mustUnderstand"=>"1"},"MessageId" => { "xmlns"=>
"http://www.w3.org/2005/08/addressing"}, "wsse:Security" =>
{"S:mustUnderstand" => "1"}, "Timestamp" => {"xmlns:ns" => "url"}}
}

and the request it's formed in this way

<env:Header>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
</ReplyTo>
<To xmlns="namespace">URL</To>
<Action xmlns="namespace"
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
S:mustUnderstand="1">action</Action>
<MessageId
xmlns="http://www.w3.org/2005/08/addressing">uuid</MessageId>
<wsse:Security S:mustUnderstand="1">
<wsu:Timestamp>
<wsu:Expires> Time</wsu:Expires>
<wsu:Created> Time</wsu:Created>
</wsu:Timestamp>
</wsse:Security>
</env:Header>

Like you can see the issue I have is that the node Timestamp don't have
his attribute and this happen with every node inside of another one it
just seems to work right for parent nodes

searchin I found that gyoku 0.4.4 support another way to write the
attributes using @ but i write something like this

{"a" => "@ns:name", "_content" => {"b", "c"}}

and it make a real mess it creates the node <_content> instead of the
result i want.

What i'm doing wrong? I use savon 0.9.9

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate