# SOAP4R logging

**URL:** <https://www.ruby-forum.com/t/soap4r-logging/76803>\
**Category:** Ruby\
**Created:** [November 21, 2006, 10:30am UTC](https://www.ruby-forum.com/t/soap4r-logging/76803 "2006-11-21T10:30:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@Gareth\_A](https://www.ruby-forum.com/u/Gareth_A)\
**Post date:** [November 21, 2006, 10:30am UTC](https://www.ruby-forum.com/t/soap4r-logging/76803/1 "2006-11-21T10:30:04Z")

</div>

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](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  
😉

Thanks,  
Gareth

---

<div class="post-metadata">

**Author:** ![Gareth\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@Gareth\_A](https://www.ruby-forum.com/u/Gareth_A)\
**Post date:** [November 21, 2006, 6:18pm UTC](https://www.ruby-forum.com/t/soap4r-logging/76803/2 "2006-11-21T18:18:07Z")

</div>

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

#Logging soap messages  
@soap.wiredump\_file\_base = “logs/soapresult”

---

<div class="post-metadata">

**Author:** ![Gareth\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@Gareth\_A](https://www.ruby-forum.com/u/Gareth_A)\
**Post date:** [November 22, 2006, 3:16pm UTC](https://www.ruby-forum.com/t/soap4r-logging/76803/3 "2006-11-22T15:16:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gareth\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@Gareth\_A](https://www.ruby-forum.com/u/Gareth_A)\
**Post date:** [November 24, 2006, 12:26am UTC](https://www.ruby-forum.com/t/soap4r-logging/76803/4 "2006-11-24T00:26:16Z")

</div>

I use a combination:

obj = :🧼:RPC::Driver.new  
obj.wiredump\_dev = STDERR if $DEBUG

Matt
