Loading ...
Sorry, an error occurred while loading the content.

Re: AdWords API SOAP::Lite 0.69 (Perl) not working with AdWords

Expand Messages
  • Byrne Reese
    My sincerest apologies - I am waaaay behind in work and personal stuff and have not had time to get the latest version totally fixed. Everytime I think I have
    Message 1 of 2 , Sep 5, 2006
    View Source
    • 0 Attachment
      My sincerest apologies - I am waaaay behind in work and personal stuff
      and have not had time to get the latest version totally fixed. Everytime
      I think I have time to devote to it, my time gets swallowed by another
      work project. So please accept my apologies - please continue to use
      SOAP::Lite 0.65 until I can get a fix deployed.

      Byrne

      Matthew Runo wrote:
      > I have had somewhat the same experience. I've found that 0.65 is still
      > the best version to use =(
      >
      > +--------------------------------------------------------+
      > | Matthew Runo
      > | Zappos Development
      > | mruno@... <mailto:mruno@...>
      > | 702-943-7833
      > +--------------------------------------------------------+
      >
      >
      > On Sep 5, 2006, at 11:29 AM, Patrick Chanezon wrote:
      >
      >> Hi, did anyone succeed in making Perl's SOAP::Lite 0.69 work with
      >> AdWords?
      >> It seems completely broken.
      >>
      >> P@
      >>
      >> ---------- Forwarded message ----------
      >> From: * Patrick Chanezon* <chanezon@...
      >> <mailto:chanezon@...>>
      >> Date: Aug 18, 2006 8:59 AM
      >> Subject: Re: AdWords API Re: SOAP::Lite (Perl) Updated to work with
      >> AdWords
      >> To: Byrne Reese < byrne@... <mailto:byrne@...>>
      >>
      >> Hmmm, no luck.
      >> I installed it from from cpan and the basic samples don't work
      >> anymore with it.
      >> The issue is during serialization: it serializes an empty element and
      >> ignores the hash I pass to methods.
      >> Any useful pointers would be useful.
      >> Here's a sample that is supposed to create a campaign
      >>
      >> In order to try it, you don't need an adwords account, we have a
      >> sandbox now, all you need is a regular google account.
      >> You need to uncomment these lines
      >> #my $url =
      >> "http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL
      >> <http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL>";
      >> #my $email = ...
      >> #my $password = ...
      >> #my $useragent = ...
      >> #my $token = ...
      >>
      >> and fill them according to
      >> http://www.google.com/apis/adwords/developer/adwords_api_sandbox.html
      >> <http://www.google.com/apis/adwords/developer/adwords_api_sandbox.html>
      >>
      >> What happens is that the generated payload looks like:
      >> <soap:Body><impl:addCampaign><campaign xsi:nil="true"
      >> xsi:type="impl:Campaign" /></impl:addCampaign></ soap:Body>
      >>
      >> It is like if $campaign was not considered at all.
      >> Not sure how it's supposed to work in this version, looking at the
      >> samples for WSDL did not help (stock quote, single parameter:-)
      >> Any help would be welcome.
      >> I'll be off all next week but will be back august 28th.
      >>
      >> P@
      >>
      >> #!/usr/bin/perl -w
      >> #
      >> # Copyright 2004 Google
      >>
      >> #use strict;
      >> #use SOAP::Lite;
      >> # use this form to trun on tracing and log request and response data
      >> use SOAP::Lite +trace;
      >>
      >> # Sample NetAPI client code for CampaignService.addCampaign()
      >>
      >> # Uncomment and fill this in with your login information.
      >> #
      >> #my $url = "
      >> http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL
      >> <http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL>";
      >> #my $email = ...
      >> #my $password = ...
      >> #my $useragent = ...
      >> #my $token = ...
      >>
      >> my $namespace = " https://adwords.google.com/api/adwords/v4 ";
      >>
      >> # Set up the connection to the server.
      >> my $service = SOAP:: Lite->service($url);
      >>
      >> # Uncomment this line to display the XML request/response.
      >> #$service->on_debug( sub { print @_ } );
      >>
      >> # Disable autotyping.
      >> $service->autotype(0);
      >>
      >> # Register a fault handler.
      >> $service->on_fault(\&faulthandler);
      >>
      >> my @headers =
      >>
      >> (SOAP::Header->name("email")->value($email)->uri($namespace)->prefix("impl"),
      >>
      >>
      >> SOAP::Header->name("password")->value($password)->uri($namespace)->prefix("impl"),
      >>
      >> SOAP::Header->name("useragent")->value($useragent)->uri($namespace)->prefix("impl"),
      >>
      >>
      >> SOAP::Header->name("token")->value($token)->uri($namespace)->prefix("impl"));
      >>
      >> # Create the new Campaign structure.
      >>
      >> my $campaign = {
      >> 'dailyBudget' => 70000,
      >> 'status' => 'Paused'
      >> # Target English and Spanish
      >> # 'languageTargeting' =>
      >> \SOAP::Data->name('languages')->value("en", "es"),
      >> # Target one state
      >> # 'geoTargeting' => { "regions" => "US-ID" },
      >> };
      >>
      >> # Call the service. The return value is the full data for the new
      >> campaign.
      >> my $data = $service->addCampaign($campaign, @headers);
      >>
      >> print "The new campaign is named '" . $data->{"name"};
      >> print "' and has ID " . $data->{"id"} . "\n";
      >>
      >> # The 'languages' parameter might be a scalar or an array. This
      >> demonstrates
      >> # how to cast the result to always be an array.
      >> my @return_langs = array($data->{"languageTargeting"}{"languages"});
      >>
      >> print "The campaign targets languages " . join(',', @return_langs) .
      >> "\n";
      >>
      >> ### Helper functions
      >>
      >> sub faulthandler {
      >> my ($soap, $res) = @_;
      >> die("SOAP Fault: " . $res->faultstring . " for input \"" .
      >> $res->faultdetail->{"trigger"} .
      >>
      >> "\" (Error Code " . $res->faultdetail->{"code"} . ")");
      >> }
      >>
      >> # Convert the argument to an array.
      >> # If the argument is an array reference, it is returned after being cast
      >> # to an array. If the argument is anything else, a one-element array
      >> # containing that value is returned.
      >> sub array {
      >> my ($x) = @_;
      >> ref($x) eq "ARRAY" ? @$x : ( $x );
      >>
      >> }
      >>
      >>
      >> On 8/17/06, *Patrick Chanezon* <chanezon@...
      >> <mailto:chanezon@...> > wrote:
      >>
      >> Thanks very much. I would not mind at all, I'll test it today and
      >> tomorrow.
      >>
      >> P@
      >>
      >>
      >> On 8/16/06, *Byrne Reese* <byrne@...
      >> <mailto:byrne@...>> wrote:
      >>
      >> I just uploaded SOAP::Lite 0.69 to CPAN and to Sourceforge -
      >> would you
      >> mind helping me test before I issue an announcement?
      >>
      >> Patrick Chanezon wrote:
      >> > Any news on a new soap:lite 0.68 release without the
      >> omission that you
      >> > talked about in the soap::lite mailing list?
      >> > I'd like to start creating better samples for our perl users
      >> but would
      >> > prefer to do so when I have the right soap::lite version.
      >> >
      >> > P@
      >> >
      >> > On 7/7/06, *Patrick Chanezon* < chanezon@...
      >> <mailto:chanezon@...>
      >> > <mailto:chanezon@... <mailto:chanezon@...>>> wrote:
      >> >
      >> > Wow thanks very much Byrne, that is very kind.
      >> > I will update the code samples and test drive the new
      >> SOAP::Lite
      >> > version with it.
      >> >
      >> > P@
      >> >
      >> > On 7/6/06, * Byrne Reese * <byrne+google@...
      >> <mailto:byrne+google@...>
      >> > <mailto: byrne+google@...
      >> <mailto:byrne+google@...>>> wrote:
      >> >
      >> >
      >> > I thought this group would be interested in learning
      >> that I just
      >> > uploaded to CPAN a new version of SOAP::Lite
      >> (version 0.68)
      >> > that I have
      >> > been using against the most recent version of the
      >> AdWords API.
      >> > The Perl
      >> > code samples available from the AdWords API
      >> developer site is
      >> > a little
      >> > out of date (it references v2 of the API, while the
      >> most current
      >> > version is v4).
      >> >
      >> > Anyways it may take a moment or two for the new code
      >> to be
      >> > indexed and
      >> > published throughout CPAN. But keep an eye out -
      >> especially if
      >> > you have
      >> > experienced any problem in using SOAP::Lite to talk
      >> to the
      >> > AdWords API
      >> > in the past.
      >> >
      >> > If you can't wait, you can get the latest from
      >> sourceforge:
      >> >
      >> http://sourceforge.net/project/showfiles.php?group_id=66000
      >> <http://sourceforge.net/project/showfiles.php?group_id=66000>
      >> >
      >> > If you have any problems please feel free to leave a
      >> note on this
      >> > thread, or on the SOAP::Lite forum:
      >> > http://groups.yahoo.com/group/soaplite/
      >> <http://groups.yahoo.com/group/soaplite/>
      >> >
      >> > Byrne Reese
      >> > Lead Developer, SOAP::Lite
      >> >
      >> >
      >> >
      >> >
      >> >
      >> >
      >> >
      >> > --
      >> > Patrick Chanezon, Google API Evangelist
      >> > http://blog.chanezon.com/ <http://blog.chanezon.com/>
      >> > http://www.google.com/apis/adwords/
      >> > < http://www.google.com/apis/adwords/>
      >> >
      >> >
      >> >
      >> >
      >> >
      >> > --
      >> > Patrick Chanezon, Google API Evangelist
      >> > http://blog.chanezon.com/ <http://blog.chanezon.com/>
      >> > http://www.google.com/apis/adwords/
      >> <http://www.google.com/apis/adwords/>
      >> <http://www.google.com/apis/adwords/>
      >>
      >>
      >>
      >>
      >> --
      >> Patrick Chanezon, Google API Evangelist
      >> http://blog.chanezon.com/
      >> http://www.google.com/apis/adwords/
      >>
      >>
      >>
      >>
      >> --
      >>
      >> Patrick Chanezon, Google API Evangelist
      >> http://blog.chanezon.com/
      >> http://www.google.com/apis/adwords/
      >>
      >>
      >> --
      >> Patrick Chanezon, Google API Evangelist
      >> http://blog.chanezon.com/
      >> http://www.google.com/apis/adwords/
      >> <http://www.google.com/apis/adwords/>
      >> --~--~---------~--~----~------------~-------~--~----~
      >> You received this message because you are subscribed to the Google
      >> Groups "AdWords API Forum" group.
      >> To post to this group, send email to adwords-api@...
      >> <mailto:adwords-api@...>
      >> To unsubscribe from this group, send email to
      >> adwords-api-unsubscribe@...
      >> <mailto:adwords-api-unsubscribe@...>
      >> For more options, visit this group at
      >> http://groups.google.com/group/adwords-api
      >> -~----------~----~----~----~------~----~------~--~---
      >>
      >
    • Patrick Chanezon
      No worries Byrne, I know the feeling:-) Thanks for the module, and just let us know when it s updated so that i can test it. P@ ... -- Patrick Chanezon, Google
      Message 2 of 2 , Sep 5, 2006
      View Source
      • 0 Attachment
        No worries Byrne, I know the feeling:-)
        Thanks for the module, and just let us know when it's updated so that i can test it.

        P@

        On 9/5/06, Byrne Reese <byrne@...> wrote:
        My sincerest apologies - I am waaaay behind in work and personal stuff
        and have not had time to get the latest version totally fixed. Everytime
        I think I have time to devote to it, my time gets swallowed by another
        work project. So please accept my apologies - please continue to use
        SOAP::Lite 0.65 until I can get a fix deployed.

        Byrne

        Matthew Runo wrote:
        > I have had somewhat the same experience. I've found that 0.65 is still
        > the best version to use =(
        >
        > +--------------------------------------------------------+
        >  | Matthew Runo
        >  | Zappos Development
        >  | mruno@... <mailto:mruno@...>
        >  | 702-943-7833
        > +--------------------------------------------------------+
        >
        >
        > On Sep 5, 2006, at 11:29 AM, Patrick Chanezon wrote:
        >
        >> Hi, did anyone succeed in making Perl's SOAP::Lite 0.69 work with
        >> AdWords?
        >> It seems completely broken.
        >>
        >> P@
        >>
        >> ---------- Forwarded message ----------
        >> From: * Patrick Chanezon* <chanezon@...
        >> <mailto: chanezon@...>>
        >> Date: Aug 18, 2006 8:59 AM
        >> Subject: Re: AdWords API Re: SOAP::Lite (Perl) Updated to work with
        >> AdWords
        >> To: Byrne Reese < byrne@... <mailto:byrne@...>>
        >>
        >> Hmmm, no luck.
        >> I installed it from from cpan and the basic samples don't work
        >> anymore with it.
        >> The issue is during serialization: it serializes an empty element and
        >> ignores the hash I pass to methods.
        >> Any useful pointers would be useful.
        >> Here's a sample that is supposed to create a campaign
        >>
        >> In order to try it, you don't need an adwords account, we have a
        >> sandbox now, all you need is a regular google account.
        >> You need to uncomment these lines
        >> #my $url =
        >> "http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL
        >> < http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL>";
        >> #my $email = ...
        >> #my $password = ...
        >> #my $useragent = ...
        >> #my $token = ...
        >>
        >> and fill them according to
        >> http://www.google.com/apis/adwords/developer/adwords_api_sandbox.html
        >> < http://www.google.com/apis/adwords/developer/adwords_api_sandbox.html>
        >>
        >> What happens is that the generated payload looks like:
        >> <soap:Body><impl:addCampaign><campaign xsi:nil="true"
        >> xsi:type="impl:Campaign" /></impl:addCampaign></ soap:Body>
        >>
        >> It is like if $campaign was not considered at all.
        >> Not sure how it's supposed to work in this version, looking at the
        >> samples for WSDL did not help (stock quote, single parameter:-)
        >> Any help would be welcome.
        >> I'll be off all next week but will be back august 28th.
        >>
        >> P@
        >>
        >> #!/usr/bin/perl -w
        >> #
        >> # Copyright 2004 Google
        >>
        >> #use strict;
        >> #use SOAP::Lite;
        >> # use this form to trun on tracing and log request and response data
        >> use SOAP::Lite +trace;
        >>
        >> # Sample NetAPI client code for CampaignService.addCampaign()
        >>
        >> # Uncomment and fill this in with your login information.
        >> #
        >> #my $url = "
        >> http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL
        >> < http://sandbox.google.com/api/adwords/v4/CampaignService?WSDL>";
        >> #my $email = ...
        >> #my $password = ...
        >> #my $useragent = ...
        >> #my $token = ...
        >>
        >> my $namespace = " https://adwords.google.com/api/adwords/v4 ";
        >>
        >> # Set up the connection to the server.
        >> my $service = SOAP:: Lite->service($url);
        >>
        >> # Uncomment this line to display the XML request/response.
        >> #$service->on_debug( sub { print @_ } );
        >>
        >> # Disable autotyping.
        >> $service->autotype(0);
        >>
        >> # Register a fault handler.
        >> $service->on_fault(\&faulthandler);
        >>
        >> my @headers =
        >>
        >> (SOAP::Header->name("email")->value($email)->uri($namespace)->prefix("impl"),
        >>
        >>
        >> SOAP::Header->name("password")->value($password)->uri($namespace)->prefix("impl"),
        >>
        >> SOAP::Header->name("useragent")->value($useragent)->uri($namespace)->prefix("impl"),
        >>
        >>
        >> SOAP::Header->name("token")->value($token)->uri($namespace)->prefix("impl"));
        >>
        >> # Create the new Campaign structure.
        >>
        >> my $campaign = {
        >>         'dailyBudget' => 70000,
        >>         'status' => 'Paused'
        >>         # Target English and Spanish
        >> #        'languageTargeting' =>
        >> \SOAP::Data->name('languages')->value("en", "es"),
        >>         # Target one state
        >> #        'geoTargeting' => { "regions" => "US-ID" },
        >>            };
        >>
        >> # Call the service.  The return value is the full data for the new
        >> campaign.
        >> my $data = $service->addCampaign($campaign, @headers);
        >>
        >> print "The new campaign is named '" . $data->{"name"};
        >> print "' and has ID " . $data->{"id"} . "\n";
        >>
        >> # The 'languages' parameter might be a scalar or an array.  This
        >> demonstrates
        >> # how to cast the result to always be an array.
        >> my @return_langs = array($data->{"languageTargeting"}{"languages"});
        >>
        >> print "The campaign targets languages " . join(',', @return_langs) .
        >> "\n";
        >>
        >> ### Helper functions
        >>
        >> sub faulthandler {
        >>   my ($soap, $res) = @_;
        >>   die("SOAP Fault: " . $res->faultstring . " for input \"" .
        >>       $res->faultdetail->{"trigger"} .
        >>
        >>       "\" (Error Code " . $res->faultdetail->{"code"} . ")");
        >> }
        >>
        >> # Convert the argument to an array.
        >> # If the argument is an array reference, it is returned after being cast
        >> # to an array.  If the argument is anything else, a one-element array
        >> # containing that value is returned.
        >> sub array {
        >>     my ($x) = @_;
        >>     ref($x) eq "ARRAY" ? @$x : ( $x );
        >>
        >> }
        >>
        >>
        >> On 8/17/06, *Patrick Chanezon* < chanezon@...
        >> <mailto:chanezon@...> > wrote:
        >>
        >>     Thanks very much. I would not mind at all, I'll test it today and
        >>     tomorrow.
        >>
        >>     P@
        >>
        >>
        >>     On 8/16/06, *Byrne Reese* <byrne@...
        >>     <mailto: byrne@...>> wrote:
        >>
        >>         I just uploaded SOAP::Lite 0.69 to CPAN and to Sourceforge -
        >>         would you
        >>         mind helping me test before I issue an announcement?
        >>
        >>         Patrick Chanezon wrote:
        >>         > Any news on a new soap:lite 0.68 release without the
        >>         omission that you
        >>         > talked about in the soap::lite mailing list?
        >>         > I'd like to start creating better samples for our perl users
        >>         but would
        >>         > prefer to do so when I have the right soap::lite version.
        >>         >
        >>         > P@
        >>         >
        >>         > On 7/7/06, *Patrick Chanezon* < chanezon@...
        >>         <mailto: chanezon@...>
        >>         > <mailto:chanezon@... <mailto:chanezon@...>>> wrote:
        >>         >
        >>         >     Wow thanks very much Byrne, that is very kind.
        >>         >     I will update the code samples and test drive the new
        >>         SOAP::Lite
        >>         >     version with it.
        >>         >
        >>         >     P@
        >>         >
        >>         >     On 7/6/06, * Byrne Reese * <byrne+google@...
        >>         <mailto:byrne+google@...>
        >>         >     <mailto: byrne+google@...
        >>         <mailto:byrne+google@...>>> wrote:
        >>         >
        >>         >
        >>         >         I thought this group would be interested in learning
        >>         that I just
        >>         >         uploaded to CPAN a new version of SOAP::Lite
        >>         (version 0.68)
        >>         >         that I have
        >>         >         been using against the most recent version of the
        >>         AdWords API.
        >>         >         The Perl
        >>         >         code samples available from the AdWords API
        >>         developer site is
        >>         >         a little
        >>         >         out of date (it references v2 of the API, while the
        >>         most current
        >>         >         version is v4).
        >>         >
        >>         >         Anyways it may take a moment or two for the new code
        >>         to be
        >>         >         indexed and
        >>         >         published throughout CPAN. But keep an eye out -
        >>         especially if
        >>         >         you have
        >>         >         experienced any problem in using SOAP::Lite to talk
        >>         to the
        >>         >         AdWords API
        >>         >         in the past.
        >>         >
        >>         >         If you can't wait, you can get the latest from
        >>         sourceforge:
        >>         >
        >>         http://sourceforge.net/project/showfiles.php?group_id=66000
        >>         <http://sourceforge.net/project/showfiles.php?group_id=66000 >
        >>         >
        >>         >         If you have any problems please feel free to leave a
        >>         note on this
        >>         >         thread, or on the SOAP::Lite forum:
        >>         >         http://groups.yahoo.com/group/soaplite/
        >>         <http://groups.yahoo.com/group/soaplite/ >
        >>         >
        >>         >         Byrne Reese
        >>         >         Lead Developer, SOAP::Lite
        >>         >
        >>         >
        >>         >
        >>         >
        >>         >
        >>         >
        >>         >
        >>         >     --
        >>         >     Patrick Chanezon, Google API Evangelist
        >>         >     http://blog.chanezon.com/ <http://blog.chanezon.com/>
        >>         >     http://www.google.com/apis/adwords/
        >>         >     < http://www.google.com/apis/adwords/>
        >>         >
        >>         >
        >>         >
        >>         >
        >>         >
        >>         > --
        >>         > Patrick Chanezon, Google API Evangelist
        >>         > http://blog.chanezon.com/ < http://blog.chanezon.com/>
        >>         > http://www.google.com/apis/adwords/
        >>         <http://www.google.com/apis/adwords/ >
        >>         <http://www.google.com/apis/adwords/>
        >>
        >>
        >>
        >>
        >>     --
        >>     Patrick Chanezon, Google API Evangelist
        >>     http://blog.chanezon.com/
        >>     http://www.google.com/apis/adwords/
        >>
        >>
        >>
        >>
        >> --
        >>
        >> Patrick Chanezon, Google API Evangelist
        >> http://blog.chanezon.com/
        >> http://www.google.com/apis/adwords/
        >>
        >>
        >> --
        >> Patrick Chanezon, Google API Evangelist
        >> http://blog.chanezon.com/
        >> http://www.google.com/apis/adwords/
        >> <http://www.google.com/apis/adwords/>
        >> --~--~---------~--~----~------------~-------~--~----~
        >> You received this message because you are subscribed to the Google
        >> Groups "AdWords API Forum" group.
        >> To post to this group, send email to adwords-api@...
        >> <mailto:adwords-api@...>
        >> To unsubscribe from this group, send email to
        >> adwords-api-unsubscribe@...
        >> <mailto:adwords-api-unsubscribe@...>
        >> For more options, visit this group at
        >> http://groups.google.com/group/adwords-api
        >> -~----------~----~----~----~------~----~------~--~---
        >>
        >




        --
        Patrick Chanezon, Google API Evangelist
        http://blog.chanezon.com/
        http://www.google.com/apis/adwords/
      Your message has been successfully submitted and would be delivered to recipients shortly.