Hi all,

I need to create a sandbox account: 
http://code.google.com/apis/adwords/docs/sandbox.html

It states:

"To create a sandbox account, send a get request to the sandbox
version of CampaignService, using the WSDL location and sandbox
headers as described below. This initial call to the sandbox creates
an MCC sandbox account, along with five client accounts, for the email
address you specified. Your sandbox account and its client accounts
start out empty."

I created my authToken with:

    my $token = Google::Ads::Common::AuthToken::get_token({
        email    => EMAIL,
        password => PASSWORD,
        service  => "adwords"
    });

However, issuing a GET request to the specified WSDL location results
in a 500 error with the following content:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>No such operation:  (HTTP GET PATH_INFO: /
v201109/CampaignService)</faultstring></soap:Fault></soap:Body></
soap:Envelope>

I've included my code and the request/response headers below.

Cheers,
Ovid

    use
HTTP::Request;
    use LWP::UserAgent;
    my $wsdl_location =
      'https://adwords-sandbox.google.com/api/adwords/cm/v201109/
CampaignService';
    my $req = HTTP::Request->new( GET => $wsdl_location );
    $req->header(
        ":authToken"        => $auth_token,
        ":developerToken"   => EMAIL . '++USD',
        ":userAgent"        => 'weborama',
    );

    my $ua = LWP::UserAgent->new;

    $ua->add_handler("request_send",  sub { shift->dump; return });
    $ua->add_handler("response_done", sub { shift->dump; return });

    my $res = $ua->request($req);

    if ( $res->is_success ) {
        print $res->content;
    }
    else {
        print $res->status_line, "\n";
    }

And the request/response:

GET https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService
User-Agent: libwww-perl/6.02
authToken: *********
developerToken: EMAIL++USD
userAgent: weborama

(no content)
HTTP/1.1 500 Internal Server Error
Cache-Control: private, max-age=0
Connection: close
Date: Fri, 09 Dec 2011 12:50:45 GMT
Server: GSE
Content-Type: text/xml; charset=UTF-8
Expires: Fri, 09 Dec 2011 12:50:45 GMT
Client-Date: Fri, 09 Dec 2011 12:50:45 GMT
Client-Peer: 74.125.79.100:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Google Inc/CN=Google Internet
Authority
Client-SSL-Cert-Subject: /C=US/ST=California/L=Mountain View/O=Google
Inc/CN=*.google.com
Client-SSL-Cipher: RC4-SHA
Client-SSL-Socket-Class: IO::Socket::SSL
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>No such operation:  (HTTP GET PATH_INFO: /
v201109/CampaignService)</faultstring></soap:Fault></soap:Body></
soap:Envelope>
500 Internal Server Error

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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@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