KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using the Savon gem to make a SOAP request using code similar to what's below. It's working, but I would like to view/capture the request XML without actually making a call to their server. I can view it now after a request is made by sticking a debugger line after the request and inspecting the client variable. Does anyone know of a way to view the request XML without actually making a request? I want to be able to validate the XML against a schema using Cucumber or Rspec. client = Savon::Client.new do |wsdl, http| wsdl.document = "http://fakesite.org/fake.asmx?wsdl" end client.request(:testpostdata, :xmlns => "http://fakesite.org/") do soap.header = { :cAuthentication => {"UserName" => "MyName", "Password" => "MyPassword" } } soap.body = { :xml_data => to_xml } end
Tags (comma-separated)
Save Edits
Cancel