Hello Team,
These are the steps i am following
1. I have created one account by passing the following values (the publisher id for this is ca-pub-5932155984517618 )
Following is the xml
RequestPOST /api/adsense/v3/AccountService HTTP/1.0
Host:
sandbox.google.comUser-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:createAccount"
Content-Length: 1130
<?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>Q6R3l6a483
</developer_password>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:createAccount
xmlns:ns1="
http://www.google.com/api/adsense/v3">
<loginEmail>
talluri...@gmail.com
</loginEmail>
<entityType>
<value>Individual
</value>
</entityType>
<websiteUrl>
http://www.indyarocks.com</websiteUrl>
<websiteLocale>en
</websiteLocale>
<usersPreferredLocale>en_US
</usersPreferredLocale>
<emailPromotionPreferences>true
</emailPromotionPreferences>
<synServiceTypes>
<value>ContentAds
</value>
</synServiceTypes>
<developerUrl>
code.google.com</developerUrl>
<debug_zip>500016
</debug_zip>
<debug_phone>02616
</debug_phone>
<debug_association_type>NotAssociated
</debug_association_type>
</ns1:createAccount>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ResponseHTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 07 Oct 2009 05:12:54 GMT
Expires: Wed, 07 Oct 2009 05:12:54 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
Server: GFE/2.0
X-XSS-Protection: 0
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:createAccountResponse
xmlns:ns="
http://www.google.com/api/adsense/v3">
<return>
<type>
<value>ContentAds
</value>
</type>
<id>ca-pub-5932155984517618
</id>
</return>
</ns:createAccountResponse>
</soapenv:Body>
</soapenv:Envelope>
Hope now i can assosiate this account wsith the developer site
2. Now i am trying to get the getAssociationStatus
I am passing 'dummy' as the param to the $client->call('getAssociationStatus', $param, ADSENSE_NAMESPACE);
Getting the same error as An internal error has occurred. Please retry your request. Any thing is wrong in calling function?
RequestPOST /api/adsense/v3/AccountService HTTP/1.0
Host:
sandbox.google.comUser-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:getAssociationStatus"
Content-Length: 574
<?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>Q6R3l6a483
</developer_password>
<client_id>ca-pub-5932155984517618
</client_id>
</SOAP-ENV:Header>
<SOAP-ENV:Body>dummy
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ResponseHTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 07 Oct 2009 05:29:12 GMT
Expires: Wed, 07 Oct 2009 05:29:12 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
Server: GFE/2.0
X-XSS-Protection: 0
<?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>
<axis2ns198:AdSenseApiExceptionFault
xmlns:axis2ns198="
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>
</axis2ns198:AdSenseApiExceptionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Array ( [error] => An internal error has occurred. Please retry your request. )
3. Now i can generate the ad code by using the same publisher id. RequestPOST /api/adsense/v3/AdSenseForContentService HTTP/1.0
Host:
sandbox.google.com
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:generateAdCode"
Content-Length: 1137
<?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>Q6R3l6a483
</developer_password>
<client_id>ca-pub-5932155984517618
</client_id>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:generateAdCode
xmlns:ns1="
http://www.google.com/api/adsense/v3">
<synServiceId>ca-pub-5932155984517618
</synServiceId>
<adStyle>
<name>demoStyle
</name>
<borderColor>#0000FF
</borderColor>
<backgroundColor>#FFFFFF
</backgroundColor>
<titleColor>#FF0000
</titleColor>
<textColor>#00FF00
</textColor>
<urlColor>#FFFF00
</urlColor>
</adStyle>
<adUnitType>
<value>TextOnly
</value>
</adUnitType>
<layout>
<value>728x90
</value>
</layout>
<isFramedPage type="xsd:boolean">false
</isFramedPage>
<channelName xsi:nil="true"/>
<cornerStyles>
<value>DEFAULT
</value>
</cornerStyles>
</ns1:generateAdCode>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ResponseHTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 07 Oct 2009 05:37:09 GMT
Expires: Wed, 07 Oct 2009 05:37:09 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
Server: GFE/2.0
X-XSS-Protection: 0
<?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>
<axis2ns200:AdSenseApiExceptionFault
xmlns:axis2ns200="
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>
</axis2ns200:AdSenseApiExceptionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Thanks,
Talluri.