0

How can see the wiredump of a soap using the 'handsoap' library?

I use the on_before_dispatch hook, and right now I am looking at the SoapService variables to see where such a request might be stored.

Hmm.. I should also check out invoke to see which var. is using..

Do you have a quick solution? :D Thanks

troelskn
  • 115,121
  • 27
  • 131
  • 155

3 Answers3

3

You can dump http-activity by setting the class variable $logger, as in:

Example::FooService.logger = $stdout

This will dump out the http-request and response, nicely formatted. Note that this is not 100% what goes over the wire, since the underlying http-client implementation may add some headers etc. For most uses, ths doesn't matter, but if you're tracing down a bug, you might want to employ wireshark.

troelskn
  • 115,121
  • 27
  • 131
  • 155
0

I used the hook

def on_before_dispatch
    puts @@document
  end

and document holds the doc variable.

@@document = nil

  def on_create_document(doc)
    @@document = doc
    ...
  • A toolkit for using soap web services in Ruby should contain: - wireshark - soapUI - handsoap –  Sep 07 '09 at 10:04
0

On a more abstract (none ruby specific) note, try wireshark. Been using it for wiredumps for all kinds of apps for years.

cwninja
  • 9,550
  • 1
  • 29
  • 22