monkey patch solved our problem - so i think this is good answer for now. we're looking to add this solution to savon 3 master if possible, details: https://github.com/savonrb/savon/issues/546
class Savon
class Operation
attr_accessor :raw_xml_envelope
def call
message = (raw_xml_envelope != nil ? raw_xml_envelope : build)
raw_response = @http.post(endpoint, http_headers, message)
Response.new(raw_response)
end
end
end
more background:
we've built a webservices (SOAP & REST) testing framework using Savon for the soap backbone. in our framework we define a couple methods describing each wsdl operation, our use case is to allow usage of the savon body() method when wanting to define the xml body as a hash (as described by savon's example_body()) or to pass in the complete raw xml envelope - which we are able to do using raw_xml_envelope() method above via monkey patch.