[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: SOAP4R logging

David Sledge

11/21/2006 5:18:00 PM

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

1 Answer

Matt Rose

11/23/2006 11:24:00 PM

0

I use a combination:

obj = ::SOAP::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?...
>> > ).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
>> >
>> >
>> >
>>
>>