Hi Scott,

It looks like the SOAP header is only being partially populated, and
that the credentials aren't being set.  Have you changed how you load
your credentials?  Are you using a properties files?  What is the
'path' variable you are passing in to the constructor?

Best,
- Eric

On Feb 24, 11:16 am, Scott Sexton <scott.sex...@gmail.com> wrote:
> That's what I first tried, but it causes the header to not be included
> in the SOAP call. Check it out:
>
> my $client = Google::AdWords::Client->new({'path' => '/var/www/
> testing'});
> $client->set_debug(*STDERR);
> my $info_selector = {
>         selector => {
>                 apiUsageType => 'FREE_USAGE_API_UNITS_PER_MONTH',
>         },};
>
> my $ret = $client->InfoService()->get($info_selector);
> print STDOUT Dumper($ret);
>
> This looks right, looks like the example, but you get this:
>
> Outgoing Request:
> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-
> instance" 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";><SOAP-ENV:Header><RequestHeader
>  xmlns="https://adwords.google.com/api/
>
> adwords/info/v200909"><userAgent>Perl Google::AdWords::Client 1.3.0: ./
> info_test.pl</userAgent><validateOnly>false</validateOnly></
> RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><get xmlns="https://
> adwords.google.com/api/adwords/info/
> v200909"><selector><apiUsageType>FREE_USAGE_API_UNITS_PER_MONTH</
> apiUsageType></selector></get></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
> Incoming Response:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
> envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</
> faultcode><faultstring>authToken is missing in SoapHeader. while
> invoking public abstract
> com.google.ads.api.services.info.v200909.jaxbgen.ApiUsageInfo
> com.google.ads.api.services.info.v200909.jaxbgen.InfoServiceInterface.get(c 
> om.google.ads.api.services.info.v200909.jaxbgen.InfoSelector)
> throws
> com.google.ads.api.services.info.v200909.jaxbgen.ApiException_Exception
> with params
> [com.google.ads.api.services.info.v200909.jaxbgen.infoselec...@196b8].</
> faultstring></soap:Fault></soap:Body></soap:Envelope>
>
> Something is not kosher here. What's going on?
>
> On Feb 24, 8:25 am, AdWords API Advisor <adwordsapiadvi...@google.com>
> wrote:
>
>
>
> > Hi Scott,
>
> > It's always best to turn on SOAP XML logging in these situations,
> > since it lets you see how the request is actually being sent to the
> > API servers.  This can be done using:
>
> >   $client->set_debug(*STDERR);
>
> > In your case it seems like the <get> and <selector> elements aren't
> > being serialized correctly.  The selector object needs to passed in to
> > the method as the value of the array key "selector":
>
> >  http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/...
>
> > Best,
> > - Eric Koleda, AdWords API Team
>
> > On Feb 23, 3:40 pm, Scott Sexton <scott.sex...@gmail.com> wrote:
>
> > > Ok, I'm able to get a different error now:
>
> > > 'faultcode' => 'soap:Client',
> > > 'faultstring' => 'Message part apiUsageType was not recognized.'
>
> > > Using this code:
>
> > > use Data::Dumper;
> > > use Google::AdWords::Client;
> > > use Google::AdWords::v200909::InfoService;
> > > use Google::AdWords::v200909::Types::InfoSelector;
> > > use Google::AdWords::v200909::InfoService::RequestHeader;
> > > use Google::AdWords::v200909::Types::ApiUsageType;
> > > my $client = Google::AdWords::Client->new({'path' => '/var/www/
> > > testing'});
> > > my $info_service = $client->InfoService;
> > > my $header = $info_service->get_client->_get_header();
> > > my $selector = Google::AdWords::v200909::Types::InfoSelector->new();
> > > $selector->set_apiUsageType('FREE_USAGE_API_UNITS_PER_MONTH');
> > > my $ret = $info_service->get($selector, $header);
> > > print STDOUT Dumper($ret);
>
> > > Does anybody know what syntax these perl modules are expecting? I'm
> > > having trouble finding any documentation or examples.

-- 
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-...@googlegroups.com.
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en.

Reply via email to