i'm using savon gem access soap api. thing is, api requires keys in uppercase , other keys in lowercase, can't use option convert_request_keys_to
parameter.
this format of api need comply to:
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="xmlservices"> <soapenv:header/> <soapenv:body> <xs:getrooms> <xs:request> <xs:credentials> <xs:credential1>"example1"</xs:credential1> <xs:credential2>"example2"</xs:credential2> <xs:credential3>"example3"</xs:credential3> </xs:credentials> </xs:request> </xs:getrooms>
as can see request
lowercase, , rest uppercase.
this how use gem:
def call(method, attributes = nil) attributes = { 'request': { 'credentials': attributes } } response = client.call(method, message: attributes) #do response end
am calling right? there option i'm missing? need fork repository , modify gem myself?
okay, pretty simple:
just needed use option convert_request_keys_to :none
Comments
Post a Comment