# SOAP4R logging

**URL:** <https://rubytalk.org/t/soap4r-logging/33114>\
**Category:** ruby-talk\
**Created:** [21 November 2006 09:28 UTC](https://rubytalk.org/t/soap4r-logging/33114 "2006-11-21T09:28:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth\_Adams](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@Gareth\_Adams](https://rubytalk.org/u/Gareth_Adams)\
**Post date:** [21 November 2006 09:28 UTC](https://rubytalk.org/t/soap4r-logging/33114/1 "2006-11-21T09:28:40Z")

</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:** ![David\_Sledge](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@David\_Sledge](https://rubytalk.org/u/David_Sledge)\
**Post date:** [21 November 2006 17:17 UTC](https://rubytalk.org/t/soap4r-logging/33114/2 "2006-11-21T17:17:44Z")

</div>

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

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

Gareth Adams wrote:

> **···**
>
> > 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&quot](http://bigbluepublishing.createsend.com/api/api.asmx?WSDL&quot);  
> > ).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:** ![Charlie\_Bowman2](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@Charlie\_Bowman2](https://rubytalk.org/u/Charlie_Bowman2)\
**Post date:** [22 November 2006 14:14 UTC](https://rubytalk.org/t/soap4r-logging/33114/3 "2006-11-22T14:14:48Z")

</div>

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

> **···**
>
> On 11/21/06, David Sledge \<dsledge@appriss.com\> wrote:
> 
> > Try this. It will write the request and response to some log files.
> > 
> > #Logging soap messages  
> > @soap.wiredump\_file\_base = "logs/soapresult"
> > 
> > Gareth Adams wrote:  
> > \> 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&quot](http://bigbluepublishing.createsend.com/api/api.asmx?WSDL&quot);  
> > \> ).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:** ![Matt\_Rose](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Matt\_Rose](https://rubytalk.org/u/Matt_Rose)\
**Post date:** [23 November 2006 23:24 UTC](https://rubytalk.org/t/soap4r-logging/33114/4 "2006-11-23T23:24:27Z")

</div>

I use a combination:

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

Matt

> **···**
>
> On 22-Nov-06, at 9:14 AM, Charlie Bowman wrote:
> 
> > also, try calling your app with -d (ruby -d yourfile.rb)
> > 
> > On 11/21/06, David Sledge \<dsledge@appriss.com\> wrote:
> > 
> > > Try this. It will write the request and response to some log files.
> > > 
> > > #Logging soap messages  
> > > @soap.wiredump\_file\_base = "logs/soapresult"
> > > 
> > > Gareth Adams wrote:  
> > > \> 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&quot](http://bigbluepublishing.createsend.com/api/api.asmx?WSDL&quot);  
> > > \> ).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  
> > > \>
