tags:

views:

23

answers:

2

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?

+1  A: 

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
Seconded. Savon is a lot nicer to work with.
vonconrad
A: 

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