SOAP4R logging

Hi guys,

Is there an easy way to see the output sent by SOAP::WSDLDriver? I’m
errors about wrong arguments from the remote service that I’m not
expecting, and
I can’t work out why.

soap =
soap.addSubscriber(API_KEY, LIST_IDS[list], address, name) # Wrong
number of
arguments - 1 expected
soap.addSubscriber( :ApiKey => API_KEY, :ListId => LIST_IDS[list],
:Email =>
address, :Name => name)

I’m getting an error telling me that the list ID I’m sending is invalid,
using another SOAP tool with the same data works, so I think I must be
the function wrongly. In any case, it would be useful to see what XML
the SOAP
classes are sending out - is that possible?

If anyone wants to look at the WSDL and let me know if there’s a problem
the WSDL isn’t under my control but it’ll be good to know that it’s not
my fault


Try this. It will write the request and response to some log files.

#Logging soap messages
@soap.wiredump_file_base = “logs/soapresult”

also, try calling your app with -d (ruby -d yourfile.rb)

I use a combination:

obj =
obj.wiredump_dev = STDERR if $DEBUG


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs