# Soap4r - wsdl2rb problems (maybe)

**URL:** <https://www.ruby-forum.com/t/soap4r-wsdl2rb-problems-maybe/68567>\
**Category:** Ruby\
**Created:** [September 13, 2006, 5:37pm UTC](https://www.ruby-forum.com/t/soap4r-wsdl2rb-problems-maybe/68567 "2006-09-13T17:37:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [September 13, 2006, 5:37pm UTC](https://www.ruby-forum.com/t/soap4r-wsdl2rb-problems-maybe/68567/1 "2006-09-13T17:37:42Z")

</div>

In the soap4r wsdl samples directory lives some client code to connect  
to the google adwords service.

All seems to work ok (my object gets populated with data from xml  
response), except for languageTargeting. Although I can see that  
there is a valid value in the xml response, my object’s  
languageTargeting is always an empty array.

I’m wondering if this is a problem with the autogen’d campaign\_service  
classes or whether the problem lies elsewhere.

As a slight aside, is there any way to create a local Soap object  
given an xml document?

Any insights appreciated.

Cheers,

Chris

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [September 20, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/soap4r-wsdl2rb-problems-maybe/68567/2 "2006-09-20T14:22:37Z")

</div>

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

Hi,

Chris R. wrote:

> In the soap4r wsdl samples directory lives some client code to connect  
> to the google adwords service.
> 
> All seems to work ok (my object gets populated with data from xml  
> response), except for languageTargeting. Although I can see that  
> there is a valid value in the xml response, my object’s  
> languageTargeting is always an empty array.
> 
> I’m wondering if this is a problem with the autogen’d campaign\_service  
> classes or whether the problem lies elsewhere.

Can you send me a wiredump of xml response? Please ensure to delete  
private information in it before sending. I’ll look into it.

> As a slight aside, is there any way to create a local Soap object  
> given an xml document?

0% cat foo.rb  
xml = \<\< **XML**  
  
baz  
  
**XML**

require ‘xsd/mapping’  
obj = XSD::Mapping.xml2obj(xml)  
p [obj.class, obj[“bar”]]

require ‘soap/processor’  
obj = SOAP::Processor.unmarshal(xml)  
p [obj.class, obj[“bar”]]

0% ruby foo.rb  
[SOAP::Mapping::Object, “baz”]  
[SOAP::SOAPStruct, #\<SOAP::SOAPString:0x…fdbef316a {}bar  
{[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)}string\>]

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

iQEVAwUBRREq1h9L2jg5EEGlAQK0Zgf/S/lhflPuDDYqP1nvKFQSOHkwzkG7FS5X  
quqqvbJTI+z2/K1wE5eOz/B07lTZKxykRkURHW+uku2Wr8oOSNduFddnivESucsJ  
krRvsUi6ZCfOWu59hiIKRqC3ddaY89bewjGaYjpqKVforGOhD7k3jrkAvpg4yiqQ  
zpF/lDGUoN1NVufZv/ZWf8a8xxuqFtNjZi9IdULeRCvbWK0k4KnekFjCrZ690OJs  
Undl9DA5KSUt6WTgk5vVRm2nNJGUVUJEcpGYC1QKqlTmsFOqlETxNwkY3V2PF0lM  
cEqDdDhCTOunbxS4mT7/J8DnHIWfORQajx3aq8LCN+7CZRngnYp3SQ==  
=iBg1  
-----END PGP SIGNATURE-----
