Gabriel
Gabriel

Reputation:

ruby handsoap wiredump

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

Upvotes: 0

Views: 733

Answers (3)

troelskn
troelskn

Reputation: 117507

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.

Upvotes: 3

cwninja
cwninja

Reputation: 9778

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

Upvotes: 0

Gabriel
Gabriel

Reputation:

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
    ...

Upvotes: 0

Related Questions