Closed migalenkom closed 2 months ago
@michaelklishin Do you find any solution?
Hi, @Dounx as far as I remember there needs to add namespaces.
{ namespaces: { 'xmlns:wsdl' => "http://docs.oasis-open.org/wsn/b-2",
'xmlns:dom0' => "http://www.axis.com/2009/event" }
}
Where to add this namespaces?
I am trying to call some ONVIF PTZ Interface
class PTZClient
attr_reader :client
def initialize(endpoint, username, password)
@client = Savon.client do |c|
c.wsdl "https://www.onvif.org/ver20/ptz/wsdl/ptz.wsdl"
c.endpoint endpoint
c.wsse_auth(username, password, :digest)
end
end
def presets(token)
client.call(:get_presets, message: { profile_token: token })
end
end
tokens = ["profileToken1"]
endpoint = "xxx"
username = "xxx"
password = "xxx"
ptz_client = PTZClient.new(endpoint, username, password)
presets = ptz_client.presets(tokens.first)
p presets
But I also get this error: (env:Sender) the parameter value is illegal (Savon::SOAPFault)
Any idea?
OK, It's my code issue.
I forget add convert_request_keys_to :camelcase
option
looks like this was resolved?
Bug report
Current behavior:
We are using the official ONVIF tool and it is generating this request which is working correctly:
We are trying to replicate the same with Savon, we are using this code:
This code is generating this XML, which looks a little different:
When we send the SAVON version of the XML, the camera returns:
Do you have any ideas about what could be causing the issue? - We are tearing our hair out, thank you!
Steps to reproduce current behavior:
Expected behavior: request passed OK
System information: