1

I have a connection open and am doing:

values = [1, 'test']
connection.return_response_as_xml = true
response = connection.send(method_name.to_sym(), *values)

and that works fine and all. but I want to see the raw request sent across... is this possible?

asdasd
  • 261
  • 1
  • 3
  • 3

3 Answers3

1

I use the following to write my xml requests and responses to the console.

service = WebServiceSoap.new
service.wiredump_dev = STDERR;
Greg
  • 1,549
  • 1
  • 20
  • 34
1

I'd recommend using Savon (http://github.com/rubiii/savon) if possible. I know Savon will log the request and the response by default.

Curtis Edmond
  • 249
  • 1
  • 2
0

It's been ages since I worked with soap4r (I do all SOAP work with Savon these days), but as far as I can remember this should do the trick:

connection.wiredump_file_base = 'log/soap/' # or whatever directory you want log files in

Bear in mind that with this, the log files will be overwritten with each call.

vonconrad
  • 25,227
  • 7
  • 68
  • 69