Question about soap/wsdlDriver

My *guess* is that soap/wsdlDriver is being overzealous with a camelCase
naming convention and automatically converts all the methods to match
that convention. Arguably a bug, or a feature. I don't see it
documented either way in the source. In fact, I don't see any
documentation at all in the source. :frowning:

Regards,

Dan

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

···

-----Original Message-----
From: Matt Long [mailto:robothor@gmail.com]
Sent: Monday, May 08, 2006 12:47 PM
To: ruby-talk ML
Subject: Question about soap/wsdlDriver

Hi all,

I ran into an oddity the other day as I was chunking through
pickaxe. I checked google, but did not see this specific problem,
nor did I see it in the errata for the book.

I am doing the Google query example, and can run the query no
problem. I get back a result set as I expect. E.g. the first
element of a search for "ruby":
    irb(main):020:0> p result.resultElements[0]
#<SOAP::Mapping::Object:0xb0eec0
    {}URL="http://www.ruby-lang.org/&quot; {}cachedSize="18k"
    {}directoryCategory=#<SOAP::Mapping::Object:0xb0ea10
    {}fullViewableName=#<SOAP::Mapping::Object:0xb0e858>
    {}specialEncoding=#<SOAP::Mapping::Object:0xb0e5b0>>
    {}directoryTitle=#<SOAP::Mapping::Object:0xb0e1c8>
    {}hostName=#<SOAP::Mapping::Object:0xb0df0c>
    {}relatedInformationPresent="true" {}snippet="Interpreted,
dynamically typed, pure
    object-oriented, scripting language for<br> fast, easy
programming, from Japan. Simple,
    straightforward, extensible." {}summary=#<SOAP::Mapping::Object:
0xb0d8cc>
    {}title="<b>Ruby</b>-lang.org"> => nil

but, if I do the following, I get an error:

     irb(main):021:0> p result.resultElements[0].URL
     NoMethodError: undefined method `URL' for
#<SOAP::Mapping::Object:0x161dd80>
             from (irb):21

The strangeness is that URL, is defined, but the accessor was
renamed
to "uRL":

     irb(main):022:0> p result.resultElements[0].methods.sort
     [... "uRL", "uRL=", ...]
     => nil

So using uRL instead of URL "fixes" the example in the book
     irb(main):023:0> p result.resultElements[0].uRL
     "http://www.ruby-lang.org/&quot;
     => nil

Is this something specific to my environment, or is there
something I
missed in some documentation somewhere?

Thanks, that is what I thought. Or it is trying to avoid creation of what appear to be constants. It must have changed some of that behavior since the book was written.

···

On 8 May , 2006, at 2:57 PM, Berger, Daniel wrote:

My *guess* is that soap/wsdlDriver is being overzealous with a camelCase
naming convention and automatically converts all the methods to match
that convention. Arguably a bug, or a feature. I don't see it
documented either way in the source. In fact, I don't see any
documentation at all in the source. :frowning:

Regards,

Dan

--
Matt Long mlong@acm.org / mtlong@csee.usf.edu
University of South Florida, CRASAR
GnuPG public key: http://www.csee.usf.edu/~mtlong/public_key.html

If A equals success, then the formula is: A = X + Y + Z
X is work. Y is play. Z is keep your mouth shut.
- Albert Einstein