I need to create a ruby web service client(with Savon) to make a soap call to a web service which requires the EncodingType in the Nonce. So the correct soap message will have the Nonce element like this:
......
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">SomeHashValue</wsse:Nonce>
......
But in my Savon client, I don't know how to add that attribute in the Nonce element. My code here:
......
client = Savon.client do
wsdl.endpoint = "http://webservicehost/TestWebService"
wsdl.namespace = "namespace"
wsse.credentials "username", "password"
wsse.digest = "true"
end
client.request :get_service do |soap|
soap.input = [
"GetService",
{ "xmlns" => "namespace" }
]
soap.body = {
"locale" => "en_US",
"serviceID" => '123'
}
end
......
and the Nonce in the generated SOAP message is like:
......
<wsse:Nonce>SomeHashValue</wsse:Nonce>
......
So my question is, how to add the attribute EncodingType to the Nonce element, without changing/removing the SomeHashValue in the Nonce element?