[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: soap4r mapping problem when using google adwords api

NAKAMURA, Hiroshi

7/14/2005 1:15:00 PM

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

Hi Patrick,

Patrick Chanezon wrote:
> The Google Adwords sample that Nahi included in the samples at
> http://dev.ctor.org/soap4r/file/trunk/sample/wsdl/googleAdwords...
> does not work.
>
> In the course of fixing it I ran into a roadblock.
> Here's my current fix. I highlight the problems I have fixed, and
> areas where I'm not very happy with the fix I found.

> #problem: wiredump_dev does not output anything when running in SSL mode
> drv.wiredump_dev = STDOUT
> #the file based logger works
> drv.wiredump_file_base = "log"

Right.

> drv.headerhandler << HeaderHandler.new('email', 'patlist@chanezon.com')
> drv.headerhandler << HeaderHandler.new('password', 'your_password_here')
> drv.headerhandler << HeaderHandler.new('useragent', 'P@ playing with
> the API from ruby')
> drv.headerhandler << HeaderHandler.new('token', 'your_token_here')
> camplist = drv.call("getAllAdWordsCampaigns", GetAllAdWordsCampaigns.new(123))
> print camplist
> ---
>
> When I run that with a valid adwords developer account, the call is
> made and the correct repsonse is sent back, as seen in the filke log.
> However the mapper barfs.

Thank you for accurate report. With the response SOAP XML instance you
posted I could easily reproduced the problem. With default.rb generated
by wsdl2ruby.rb, SOAP Data which is defined as simpletype + restriction
was not be able to map correctly.

I think I fixed this problem at svn repository. Would you please try it
at your leisure? It still may have other problems but I want to fix
those and let soap4r interoperable with AdWards service.

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

iD8DBQFC1mU1f6b33ts2dPkRAun7AJsFypg6KH6ecwk0K5rDobSDqoXyyQCfQgU6
bIkOrAA9Oo7x34jj+bIfLaY=
=89kd
-----END PGP SIGNATURE-----


2 Answers

Patrick Chanezon

7/14/2005 9:41:00 PM

0

Wow thanks very much Hiroshi, I will test that tonight!

P@

On 7/14/05, NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Patrick,
>
> Patrick Chanezon wrote:
> > The Google Adwords sample that Nahi included in the samples at
> > http://dev.ctor.org/soap4r/file/trunk/sample/wsdl/googleAdwords...
> > does not work.
> >
> > In the course of fixing it I ran into a roadblock.
> > Here's my current fix. I highlight the problems I have fixed, and
> > areas where I'm not very happy with the fix I found.
>
> > #problem: wiredump_dev does not output anything when running in SSL mode
> > drv.wiredump_dev = STDOUT
> > #the file based logger works
> > drv.wiredump_file_base = "log"
>
> Right.
>
> > drv.headerhandler << HeaderHandler.new('email', 'patlist@chanezon.com')
> > drv.headerhandler << HeaderHandler.new('password', 'your_password_here')
> > drv.headerhandler << HeaderHandler.new('useragent', 'P@ playing with
> > the API from ruby')
> > drv.headerhandler << HeaderHandler.new('token', 'your_token_here')
> > camplist = drv.call("getAllAdWordsCampaigns", GetAllAdWordsCampaigns.new(123))
> > print camplist
> > ---
> >
> > When I run that with a valid adwords developer account, the call is
> > made and the correct repsonse is sent back, as seen in the filke log.
> > However the mapper barfs.
>
> Thank you for accurate report. With the response SOAP XML instance you
> posted I could easily reproduced the problem. With default.rb generated
> by wsdl2ruby.rb, SOAP Data which is defined as simpletype + restriction
> was not be able to map correctly.
>
> I think I fixed this problem at svn repository. Would you please try it
> at your leisure? It still may have other problems but I want to fix
> those and let soap4r interoperable with AdWards service.
>
> Regards,
> // NaHi
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (Cygwin)
>
> iD8DBQFC1mU1f6b33ts2dPkRAun7AJsFypg6KH6ecwk0K5rDobSDqoXyyQCfQgU6
> bIkOrAA9Oo7x34jj+bIfLaY=
> =89kd
> -----END PGP SIGNATURE-----
>


Patrick Chanezon

7/15/2005 5:56:00 PM

0

Yeah! Your fix works fine!
I tested it with the campaign service this morning and it worked like a
charm.
Thanks very much Hiroshi.
I'll run more tests in the next week, with other AdWords API calls.

Thanks very much for the fix. I'll study the diffs to try to better
understand how soap4r works.

P@

On 7/14/05, NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Patrick,
>
> Patrick Chanezon wrote:
> > The Google Adwords sample that Nahi included in the samples at
> >
> http://dev.ctor.org/soap4r/file/trunk/sample/wsdl/googleAdwords...
> > does not work.
> >
> > In the course of fixing it I ran into a roadblock.
> > Here's my current fix. I highlight the problems I have fixed, and
> > areas where I'm not very happy with the fix I found.
>
> > #problem: wiredump_dev does not output anything when running in SSL mode
> > drv.wiredump_dev = STDOUT
> > #the file based logger works
> > drv.wiredump_file_base = "log"
>
> Right.
>
> > drv.headerhandler << HeaderHandler.new('email', 'patlist@chanezon.com')
> > drv.headerhandler << HeaderHandler.new('password', 'your_password_here')
> > drv.headerhandler << HeaderHandler.new('useragent', 'P@ playing with
> > the API from ruby')
> > drv.headerhandler << HeaderHandler.new('token', 'your_token_here')
> > camplist = drv.call("getAllAdWordsCampaigns", GetAllAdWordsCampaigns.new
> (123))
> > print camplist
> > ---
> >
> > When I run that with a valid adwords developer account, the call is
> > made and the correct repsonse is sent back, as seen in the filke log.
> > However the mapper barfs.
>
> Thank you for accurate report. With the response SOAP XML instance you
> posted I could easily reproduced the problem. With default.rb generated
> by wsdl2ruby.rb, SOAP Data which is defined as simpletype + restriction
> was not be able to map correctly.
>
> I think I fixed this problem at svn repository. Would you please try it
> at your leisure? It still may have other problems but I want to fix
> those and let soap4r interoperable with AdWards service.
>
> Regards,
> // NaHi
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (Cygwin)
>
> iD8DBQFC1mU1f6b33ts2dPkRAun7AJsFypg6KH6ecwk0K5rDobSDqoXyyQCfQgU6
> bIkOrAA9Oo7x34jj+bIfLaY=
> =89kd
> -----END PGP SIGNATURE-----
>