wsdl2ruby.rb generated proxies and default parameters

J

John Lam

I was trying to port some working code that calls the Amazon
E-Commerce web services via SOAP calls to SOAP4R tonight. After quite
a bit of head-scratching, I realized that the default values for the
parameters passed to the constructors of the SOAP request message
types are nil. This causes the SOAP serializer to barf something
awful, and the stack trace was, um somewhat less than helpful :)

Instead of simply constructing an object like ItemLookupRequest and
omitting the values to the constructor, you must specify empty strings
for the parameters that you don't care about. If you do this,
everything works just fine.

I wanted to add this message to the archives since this might help
someone else going down this path in the future.

Also, is the behavior of wsdl2ruby correct in specifying nil for the
default values of parameters that you don't explicitly pass to the
constructor? Or is it a bug in the SOAP serializer?

Thanks
-John
http://www.iunknown.com
 
N

NAKAMURA, Hiroshi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Sorry for late reply.

John said:
I was trying to port some working code that calls the Amazon
E-Commerce web services via SOAP calls to SOAP4R tonight. After quite
a bit of head-scratching, I realized that the default values for the
parameters passed to the constructors of the SOAP request message
types are nil. This causes the SOAP serializer to barf something
awful, and the stack trace was, um somewhat less than helpful :)

Do you remember what version of soap4r did you use? I tried to support
Amazon E-Commerce web services in soap4r-1.5.4 (released in 2005-05-22),
but it may not be able to send requests correctly because I don't have
an account... (see the comment at the bottom of
sample/wsdl/amazonEC/client.rb in soap4r-1.5.4 *1).

(*1)
http://raa.ruby-lang.org/gonzui/markup/soap4r/sample/wsdl/amazonEC/client.rb

Can I see what soap4r is "barf"-ing? I'll try to fix the problem.

Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFCmc6df6b33ts2dPkRAvqSAKCNSEPKp/rIKA7wwg7ulaJQ4nBuDwCcC+sM
GLYm1GbCc5qoFNF6F8ar/XM=
=uN9k
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top