Problems testing V3 AdSense API

17 views
Skip to first unread message

miki

unread,
May 10, 2008, 5:32:00 PM5/10/08
to AdSense API Forum
Hello everyone,

I'm doing update on clients site and I have a problem testing V3
implementation of API.

The error is returned by NuSoap so I don't even get to API Error.

HTTP Error: Couldn't open socket connection to server
http://10.128.91.7:8080/axis2/services/v3/AccountService, Error
(10060): A connection attempt failed because the connected party did
not properly respond after a period of time, or established connection
failed because connected host has failed to respond.

I'm testing on my local webserver and calls to V2 went fine.

Any comment or help would be appreciated.

Thanks,
Miki

MrBrian

unread,
May 13, 2008, 11:39:11 PM5/13/08
to AdSense API Forum
Same issues... I see the v3 namespace returns a "Not Found" if you go
to it directly. http://www.google.com/api/adsense/v3

On May 10, 2:32 pm, miki <mikisp...@gmail.com> wrote:
> Hello everyone,
>
> I'm doing update on clients site and I have a problem testing V3
> implementation of API.
>
> The error is returned by NuSoap so I don't even get to API Error.
>
> HTTP Error: Couldn't open socket connection to serverhttp://10.128.91.7:8080/axis2/services/v3/AccountService, Error

miki

unread,
May 14, 2008, 4:44:07 AM5/14/08
to AdSense API Forum
I have sent the email to AdSense API support team with more details 3
days ago but still no answer.
The API sample code, at least for PHP, is out of date so I'm stuck
right now.

On May 14, 5:39 am, MrBrian <evilka...@gmail.com> wrote:
> Same issues... I see the v3 namespace returns a "Not Found" if you go
> to it directly.http://www.google.com/api/adsense/v3

adsenseapi-...@google.com

unread,
May 14, 2008, 6:51:19 PM5/14/08
to AdSense API Forum
Everyone,

I've talked with our engineers, and it looks like there's a bug with
the WSDLs for v3. Basically, it comes down to the endpoints being
malformed (in this case, IP addresses instead of simple hostnames). I
don't have an ETA on the fix, but in the meantime, I can offer you all
a workaround: manually override the endpoints of your requests to hit
https://{sandbox|www}.google.com/api/adsense/v3/${SERVICE} where the
first choice is between 'sandbox' and 'www' depending on whether
you're in production, and ${SERVICE} is a singular selection of
AccountService, AdSenseForContentService, ChannelService, etc.

The process for manually overriding in PHP (when using nuSOAP) is a
matter of including a line like:
$client->setEndpoint('https://sandbox.google.com/api/adsense/v3/
AccountService');
after you generate a client with:
$client = new soapclient($wsdl, true);

Additionally, there are a few hurdles you might encounter when
switching to v3. I'll attempt to detail a few of them here:
1. Namespaces. Your XML should include the namespace in the method
wrapper tag. For example,
<createAccount>...</createAccount>
would have been valid in v2. In v3, it must be of the form:
<ns1:createAccount xmlns:ns1="http://www.google.com/api/adsense/
v3">...</createAccount>
2. Enumerations. The use of enclosing <value></value> tags is now
mandatory. For example,
<synServiceTypes>ContentAds</synServiceTypes>
would have been allowed in v2, but in v3 it's:
<synServiceTypes>
<value>ContentAds</value>
</synServiceTypes>
This comes up several times in many of our method calls, so just
keep an eye out for it.

If you guys have any more issues, don't hesitate to let me know.

Cheers,
Wes
AdSense API

miki

unread,
May 14, 2008, 6:59:24 PM5/14/08
to AdSense API Forum
Wes,

Thank you for this information! We spent a lot of time investigating
errors, our code was the first thing to blame for errors.

Keep us posted.

Best regards,
Miki

MrBrian

unread,
May 15, 2008, 2:06:31 PM5/15/08
to AdSense API Forum
Great, got it working!

I'd also like to point out that the headers have changed from this:
$header = '<impl:developer_email>' . $dev_email . '</
impl:developer_email>';
$header .= '<impl:developer_password>' . $dev_password . '</
impl:developer_password>';
$header .= '<impl:client_id>' . $client_id . '</impl:client_id>';

to this:
$header = '<developer_email>' . $dev_email . '</developer_email>';
$header .= '<developer_password>' . $dev_password . '</
developer_password>';
$header .= '<client_id>' . $client_id . '</client_id>';

Basically the impl: is no longer needed.

SteveR

unread,
May 15, 2008, 3:47:55 PM5/15/08
to AdSense API Forum
Do you thing that this bug might also affect v2 when this change
happened for v3? At least in the sandbox?

On May 14, 3:51 pm, adsenseapi-supportt...@google.com wrote:

adsenseapi-...@google.com

unread,
May 15, 2008, 4:49:58 PM5/15/08
to AdSense API Forum
Everyone,

I'd like to head off any confusion concerning my second point (re:
Enumerations). Basically, if you have a sequence element, you must
remember to enclose the interior elements in their own particular tags
(ex <value>,<dummy>,etc.) even if there is only one.


Steve,

I doubt it. The v2 WSDLs were not regenerated, so they should still
be working properly.

Cheers,
Wes
AdSense API

miki

unread,
May 15, 2008, 7:32:11 PM5/15/08
to AdSense API Forum
Hello everyone,

I just tested and everything is ok. Just to note that for
createAccount request entityType and synServiceTypes parameters must
be formated as for example:

<entityType><value>Individual</value></entityType>

with <value>...</value> tags while others don't.

Wes pointed out but it took me a while to figure out its also needed
for entityType parameter.

Thank you all!

Cheers,
Miki

MrBrian

unread,
May 16, 2008, 3:33:47 PM5/16/08
to AdSense API Forum
Just like Miki, it took me awhile to figure out what exactly needs the
<value> parameter, so i'm gonna help make it clear how to know what,
in ALL the calls, needs <value> tags. Go to the documentation, for
example: http://code.google.com/apis/adsense/developer/AdSenseForContentService.html#generateAdCode

adUnitType, layout, and cornerStyles would all need to have <value>
tags because the API has a set of specific values you must choose
from. So when working on your API call and you see in the
documentation something like this:

Values are:

* TextOnly
* ImageOnly
* TextAndImage
* FourLinkUnit
* FiveLinkUnit

It will need to be formatted like:
<adUnitType><value>ImageOnly</value></adUnitType>


The other thing i've noticed is the response wrapper has changed for
pretty much all the API calls. Before, it looked like this to grab the
response:
$response = $response['createAdSenseAccountReturn'];

Now it's this:
$response = $response['return'];


Regards,
Brian

miki

unread,
May 16, 2008, 4:17:52 PM5/16/08
to AdSense API Forum
Thank you MrBrian for these insights.

I would like to add that API error response has also changed. Now if
you want to get error code you will use:

$response['detail']['AdSenseApiExceptionFault']['AdSenseApiException']
['code']

and before it was:

$response['detail']['code']

Cheers,
Miki

On May 16, 9:33 pm, MrBrian <evilka...@gmail.com> wrote:
> Just like Miki, it took me awhile to figure out what exactly needs the
> <value> parameter, so i'm gonna help make it clear how to know what,
> in ALL the calls, needs <value> tags. Go to the documentation, for
> example:http://code.google.com/apis/adsense/developer/AdSenseForContentServic...

MrBrian

unread,
May 22, 2008, 5:33:36 PM5/22/08
to AdSense API Forum
I really need help with to generate the code for searchbox. I've tried
every combination of using <value> and I repeatedly get Internal
Server Errors with no information.

Request

POST /api/adsense/v3/AdSenseForSearchService HTTP/1.0
Host: sandbox.google.com
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:generateSearchBoxCode"
Content-Length: 1537


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://www.google.com/api/adsense/v3">
<SOAP-ENV:Header>
<developer_email>adsensed...@google.com
</developer_email>
<developer_password>xxxx
</developer_password>
<client_id>partner-pub-5301472730598180
</client_id>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:generateSearchBoxCode
xmlns:ns1="http://www.google.com/api/adsense/v3">
<synServiceId>partner-pub-5301472730598180
</synServiceId>
<country>US
</country>
<searchType>
<value>GoogleSiteSearch
</value>
</searchType>
<siteProperties>
<locale>en
</locale>
<encoding>
</encoding>
</siteProperties>
<searchOptions>
<isSafeSearch type="xsd:boolean">true
</isSafeSearch>
<showResultsInNewWindow type="xsd:boolean">false
</showResultsInNewWindow>
</searchOptions>
<domains>sufckasdf.xxxxx.com
</domains>
<selectedDomain>sufckasdf.xxxxx.com
</selectedDomain>
<searchBoxStyle>
<logoType>GoogleLogo
</logoType>
<isLogoAbove type="xsd:boolean">true
</isLogoAbove>
<isButtonBelow type="xsd:boolean">false
</isButtonBelow>
<backgroundColor>#FFFFFF
</backgroundColor>
<textColor>black
</textColor>
<textBoxLength>20
</textBoxLength>
<isCustomStyle type="xsd:boolean">false
</isCustomStyle>
<searchStyleName>Seaside
</searchStyleName>
</searchBoxStyle>
<channelName>
</channelName>
</generateSearchBoxCode>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 22 May 2008 21:32:05 GMT
Expires: Thu, 22 May 2008 21:32:05 GMT
Cache-Control: private, max-age=0
Server: GFE/1.3
Connection: Close


<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException
</faultcode>
<faultstring>An internal error has occurred. Please retry your
request.
</faultstring>
<detail>
<axis2ns46:AdSenseApiExceptionFault
xmlns:axis2ns46="http://www.google.com/api/adsense/v3">
<AdSenseApiException>
<code>0
</code>
<internal>true
</internal>
<message>An internal error has occurred. Please retry your request.
</message>
<trigger>
</trigger>
<triggerDetails>
</triggerDetails>
</AdSenseApiException>
</axis2ns46:AdSenseApiExceptionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

adsenseapi-...@google.com

unread,
May 22, 2008, 8:22:32 PM5/22/08
to AdSense API Forum
Guys,

I've also been informed of another error you may hit when using
generateAdCode with an empty <alternate> element. In this case, you
should give the element the attribute 'xsi:nil="1"' and you must add
the namespace "http://www.w3.org/2001/XMLSchema-instance" to your
method wrapper.

The relevant code snippets for these two items:
<alternate xsi:nil="1"/>
and
<ns1:generateAdCode xmlns:ns1="http://www.google.com/api/adsense/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-
ENC:root="1">

In general, whenever your XML includes an empty nillable element, you
should include the xsi:nil="1" attribute and add the XMLSchema-
instance namespace.

Cheers,
Wes
AdSense API


P.S. Brian, it looks like the ordering is off for some of your
elements--specifically siteProperties and searchBoxStyle.
SearchBoxStyle is also missing a nested <value> enclosure. I've
included it below.

siteProperties should look like this:
<siteProperties>
<encoding></encoding>
<locale>en</locale>
</siteProperties>

searchBoxStyle should look like this:
<searchBoxStyle>
<backgroundColor>#FFFFFF</backgroundColor>
<isButtonBelow type="xsd:boolean">false</isButtonBelow>
<isCustomStyle type="xsd:boolean">false</isCustomStyle>
<isLogoAbove type="xsd:boolean">true</isLogoAbove>
<logoType><value>GoogleLogo</value></logoType>
<searchStyleName>Seaside</searchStyleName>
<textBoxLength>20</textBoxLength>
<textColor>black</textColor>
</searchBoxStyle>

I would also look into including the xsi:nil="1" attribute that I
talked about above for your empty elements. Let me know if you still
have issues after that.

Hope that helps!


On May 22, 2:33 pm, MrBrian <evilka...@gmail.com> wrote:
> I really need help with to generate the code for searchbox. I've tried
> every combination of using <value> and I repeatedly get Internal
> Server Errors with no information.
>
> Request
>
> POST /api/adsense/v3/AdSenseForSearchService HTTP/1.0
> Host: sandbox.google.com
> User-Agent: NuSOAP/0.7.2 (1.94)
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "urn:generateSearchBoxCode"
> Content-Length: 1537
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns0="http://www.google.com/api/adsense/v3">
> <SOAP-ENV:Header>
> <developer_email>adsensedevelop...@google.com

MrBrian

unread,
May 23, 2008, 2:21:40 PM5/23/08
to AdSense API Forum
Thanks for the quick reply, this is my last problem before I can start
using v3 on my site. The order I was using was structured after the
PHP sample code provided for v2, so i'm surprised the order needs to
be different when theres been no changes. I've changed the order to
your specifications and also added the nil attribute to the <encoding>
and <channelName> elements, but i'm still receiving an internal server
error for the call. Any idea? Here's my soap call:

Request

POST /api/adsense/v3/AdSenseForSearchService HTTP/1.0
Host: sandbox.google.com
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:generateSearchBoxCode"
Content-Length: 1554


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://www.google.com/api/adsense/v3">
<SOAP-ENV:Header>
<developer_email>adsensed...@google.com
</developer_email>
<developer_password>xxxxxxx
</developer_password>
<client_id>partner-pub-5301472730598180
</client_id>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:generateSearchBoxCode
xmlns:ns1="http://www.google.com/api/adsense/v3">
<synServiceId>partner-pub-5301472730598180
</synServiceId>
<country>US
</country>
<searchType>
<value>GoogleSiteSearch
</value>
</searchType>
<siteProperties>
<encoding xsi:nil="1">
</encoding>
<locale>en
</locale>
</siteProperties>
<searchOptions>
<isSafeSearch type="xsd:boolean">true
</isSafeSearch>
<showResultsInNewWindow type="xsd:boolean">false
</showResultsInNewWindow>
</searchOptions>
<domains>testing.xxxxx.com
</domains>
<selectedDomain>testing.xxxx.com
</selectedDomain>
<searchBoxStyle>
<backgroundColor>#FFFFFF
</backgroundColor>
<isButtonBelow type="xsd:boolean">false
</isButtonBelow>
<isCustomStyle type="xsd:boolean">false
</isCustomStyle>
<isLogoAbove type="xsd:boolean">true
</isLogoAbove>
<logoType>
<value>GoogleLogo
</value>
</logoType>
<searchStyleName>Seaside
</searchStyleName>
<textBoxLength>20
</textBoxLength>
<textColor>black
</textColor>
</searchBoxStyle>
<channelName xsi:nil="1">
</channelName>
</generateSearchBoxCode>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 23 May 2008 18:13:56 GMT
Expires: Fri, 23 May 2008 18:13:56 GMT
Cache-Control: private, max-age=0
Server: GFE/1.3
Connection: Close


<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException
</faultcode>
<faultstring>An internal error has occurred. Please retry your
request.
</faultstring>
<detail>
<axis2ns49:AdSenseApiExceptionFault
xmlns:axis2ns49="http://www.google.com/api/adsense/v3">
<AdSenseApiException>
<code>0
</code>
<internal>true
</internal>
<message>An internal error has occurred. Please retry your request.
</message>
<trigger>
</trigger>
<triggerDetails>
</triggerDetails>
</AdSenseApiException>
</axis2ns49:AdSenseApiExceptionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

MrBrian

unread,
May 23, 2008, 4:19:26 PM5/23/08
to AdSense API Forum
I just noticed the part about adding the namespace "http://www.w3.org/
2001/XMLSchema-instance" to the method wrapper. I added that to
generateSearchBoxCode, but results are still the same.

On May 23, 11:21 am, MrBrian <evilka...@gmail.com> wrote:
> Thanks for the quick reply, this is my last problem before I can start
> using v3 on my site. The order I was using was structured after the
> PHP sample code provided for v2, so i'm surprised the order needs to
> be different when theres been no changes. I've changed the order to
> your specifications and also added the nil attribute to the <encoding>
> and <channelName> elements, but i'm still receiving an internal server
> error for the call. Any idea? Here's my soap call:
>
> Request
>
> POST /api/adsense/v3/AdSenseForSearchService HTTP/1.0
> Host: sandbox.google.com
> User-Agent: NuSOAP/0.7.2 (1.94)
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "urn:generateSearchBoxCode"
> Content-Length: 1554
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
>     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:ns0="http://www.google.com/api/adsense/v3">
> <SOAP-ENV:Header>
> <developer_email>adsensedevelop...@google.com
> ...
>
> read more »

MrBrian

unread,
May 29, 2008, 2:59:40 PM5/29/08
to AdSense API Forum
Any idea or should I be emailing instead of google groups?
> ...
>
> read more »

adsenseapi-...@google.com

unread,
May 29, 2008, 3:09:53 PM5/29/08
to AdSense API Forum
Brian,

Sorry, I've been a little tied up with the Google I/O conference.
Could you paste the exact xml that you're currently sending and
receiving?

Cheers,
Wes
AdSense API
> ...
>
> read more »

MrBrian

unread,
May 30, 2008, 1:53:09 PM5/30/08
to AdSense API Forum
No problem Wes. Heres my API call. I've tried everything, but this
SearchAds call just does not want to work.

Request

POST /api/adsense/v3/AdSenseForSearchService HTTP/1.0
Host: sandbox.google.com
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:generateSearchBoxCode"
Content-Length: 1648


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://www.google.com/api/adsense/v3">
<SOAP-ENV:Header>
<developer_email>adsensed...@google.com
</developer_email>
<developer_password>xxxx
</developer_password>
<client_id>partner-pub-0173536335968266
</client_id>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:generateSearchBoxCode
xmlns:ns1="http://www.google.com/api/adsense/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-
ENC:root="1">
<synServiceId>partner-pub-0173536335968266
</synServiceId>
<country>US
</country>
<searchType>
<value>GoogleSiteSearch
</value>
</searchType>
<siteProperties>
<encoding xsi:nil="1">
</encoding>
<locale>en
</locale>
</siteProperties>
<searchOptions>
<isSafeSearch type="xsd:boolean">true
</isSafeSearch>
<showResultsInNewWindow type="xsd:boolean">false
</showResultsInNewWindow>
</searchOptions>
<domains>sufckasdf.paidtoblog.local
</domains>
<selectedDomain>sufckasdf.paidtoblog.local
Date: Fri, 30 May 2008 17:36:34 GMT
Expires: Fri, 30 May 2008 17:36:34 GMT
Cache-Control: private, max-age=0
Server: GFE/1.3
Connection: Close


<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException
</faultcode>
<faultstring>An internal error has occurred. Please retry your
request.
</faultstring>
<detail>
<axis2ns18:AdSenseApiExceptionFault
xmlns:axis2ns18="http://www.google.com/api/adsense/v3">
<AdSenseApiException>
<code>0
</code>
<internal>true
</internal>
<message>An internal error has occurred. Please retry your request.
</message>
<trigger>
</trigger>
<triggerDetails>
</triggerDetails>
</AdSenseApiException>
</axis2ns18:AdSenseApiExceptionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

> ...
>
> read more »

MrBrian

unread,
Jun 3, 2008, 12:12:37 PM6/3/08
to AdSense API Forum
I'm still stuck =/

On May 30, 10:53 am, MrBrian <evilka...@gmail.com> wrote:
> No problem Wes. Heres my API call. I've tried everything, but this
> SearchAds call just does not want to work.
>
> Request
>
> POST /api/adsense/v3/AdSenseForSearchService HTTP/1.0
> Host: sandbox.google.com
> User-Agent: NuSOAP/0.7.2 (1.94)
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "urn:generateSearchBoxCode"
> Content-Length: 1648
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
>     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:ns0="http://www.google.com/api/adsense/v3">
> <SOAP-ENV:Header>
> <developer_email>adsensedevelop...@google.com
> </developer_email>
> <developer_password>xxxx
> </developer_password>
> ...
>
> read more »

adsenseapi-...@google.com

unread,
Jun 3, 2008, 5:03:25 PM6/3/08
to AdSense API Forum
Brian,

I got some time to take a look at your issue, and there's two things
going on.

1. There's currently a bug (which should be fixed this month) with
generateSearchBoxCode which requires the publisher's association to be
set to "Active" for your developer. After I manually activated your
association, the call worked (mostly). You can do this yourself via
the request headers detailed here:
http://code.google.com/apis/adsense/developer/adsense_api_sandbox.html#requestheader.

2. The <encoding> parameter should not be null, or have the
xsi:nil="1" attribute. Instead, for default encoding, it should
contain the empty string, like so: <encoding></encoding>.

With these changes the request should be correct, except for the
invalid domains, but at least you'll get an informative error message
about those.

Cheers,
Wes
AdSense API
> ...
>
> read more »

MrBrian

unread,
Jun 3, 2008, 7:59:28 PM6/3/08
to AdSense API Forum
Thanks, i'm up an running :).

On Jun 3, 2:03 pm, adsenseapi-supportt...@google.com wrote:
> Brian,
>
> I got some time to take a look at your issue, and there's two things
> going on.
>
> 1.  There's currently a bug (which should be fixed this month) with
> generateSearchBoxCode which requires the publisher's association to be
> set to "Active" for your developer.  After I manually activated your
> association, the call worked (mostly).  You can do this yourself via
> the request headers detailed here:http://code.google.com/apis/adsense/developer/adsense_api_sandbox.htm....
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages