SOAP4R logging

Hi guys,

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

soap =
SOAP::WSDLDriverFactory.new(
http://bigbluepublishing.createsend.com/api/api.asmx?WSDL
).create_rpc_driver
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,
but
using another SOAP tool with the same data works, so I think I must be
calling
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
there,
the WSDL isn’t under my control but it’ll be good to know that it’s not
my fault
:wink:

Thanks,
Gareth

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 = ::soap::RPC::Driver.new
obj.wiredump_dev = STDERR if $DEBUG

Matt