KeywordPerformanceReport

Hey Guys

This might be a bit of a newbie question, that was asked a long time ago on these forums.
I am trying to pull a Keyword Performance report using the PHP-NuSOAP library to interact with the MSN-AdCenter API

I am posting a set of SOAP requests-response, along with the SOAP fault I got.

SOAP REQUEST

<xmp>POST /v3/Reporting/Reporting.asmx HTTP/1.0
Host: adcenterapi.microsoft.com
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://adcenter.microsoft.com/syncapis/RequestBIReport"
Content-Length: 937

<?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:ns2321="http://tempuri.org"><SOAP-ENV:Header><ApiUserAuthHeader xmlns="http://adcenter.microsoft.com/syncapis"><UserName>xxxxxxxx</UserName><Password>xxxxxxxx</Password><UserAccessKey>xxxxxxxx</UserAccessKey></ApiUserAuthHeader></SOAP-ENV:Header><SOAP-ENV:Body><RequestBIReport xmlns="http://adcenter.microsoft.com/syncapis"><APIFlags>0</APIFlags> <request><AccountId>xxxxx</AccountId> <CampaignIds>Array</CampaignIds><ReportAggregation>Day</ReportAggregation><ReportDateRange>Yesterday</ReportDateRange><ReportLanguage>English</ReportLanguage><Format>CSV</Format><AllNone>false</AllNone></request></RequestBIReport></SOAP-ENV:Body></SOAP-ENV:Envelope></xmp>\n<xmp>HTTP/1.1 500 Internal Server Error
Date: Thu, 19 Oct 2006 21:22:06 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 609

SOAP RESPONSE
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server was unable to read request. &gt; There is an error in XML document (1, 635). &gt; The specified type is abstract: name='ReportRequest', namespace='http://adcenter.microsoft.com/syncapis', at &lt;request xmlns='http://adcenter.microsoft.com/syncapis'&gt;.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope></xmp>

This is according to the sample request/response posted in the documentation. And the response has the error I get.
Kind of has me stumped coz I cant find the error code in the MSN Ad-Center documentation as well.

Any help will be appreciated.

[3144 byte] By [RamprasadUnReal] at [2008-2-14]
# 1
Hey Everyone

Sorry guys, I realized my mistake, I wasnt passing the xsi:type parameter in the request tag. Setting that parameter worked.

Sorry again for a superflous question.

RamprasadUnReal at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 2
Hi,

Is it possible to have the search term associated to a keyword in the keyword performance report?

Thanks.

Ludo-R at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 3

Hi,

Can you please tell me how you fixed it ? I am getting the same error as SOAP repsonse.

SOAP Request I am sending:

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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/"><SOAP-ENV:Header><ApiUserAuthHeader xmlns="http://adcenter.microsoft.com/syncapis">
<UserName>***************</UserName>
<UserAccessKey>***************</UserAccessKey>
<Password>***************</Password>
</ApiUserAuthHeader></SOAP-ENV:Header><SOAP-ENV:Body><RequestBIReport xmlns="http://adcenter.microsoft.com/syncapis">
<APIFlags>0</APIFlags>
<request>
<StartDate>2006-08-01T00:00:00</StartDate>
<EndDate>2006-10-12T00:00:00</EndDate>
<ReportDates>
<dateTime>2006-08-01T00:00:00</dateTime>
<dateTime>2006-10-12T00:00:00</dateTime>
</ReportDates>
<ReportLanguage>English</ReportLanguage>
<Format>CSV</Format>
<AllNone>true</AllNone>
</request>
</RequestBIReport></SOAP-ENV:Body></SOAP-ENV:Envelope>

SOAP Response I am getting:

Array
([faultcode] => soap:Client
[faultstring] => Server was unable to read request. > There is an error in XML document (7, 8). > The specified type is abstract: name='ReportRequest', namespace='http://adcenter.microsoft.com/syncapis', at <request xmlns='http://adcenter.microsoft.com/syncapis'>.
[detail] =>
)

Thanks,
Hari

hariarla at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 4
hey Hari

How are you?

The error is in this part <request xsi:type = "KeywordPerformanceReportRequest"> in the request tag. Thats missing on your SOAP request, and as a result, the API complains that "request" is an abstract type.

This is weird on their part, coz none of the sample requests they have up there actually mention this part. I had to spend some time figuring this out. Lemme know if you need anything else.

Good Luck....

RamprasadUnReal at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 5

Hari / Ram:

Hari you are right about the xsi:type.

Additionally sometimes the api server sends error message (server unable to process to request) at that time what i usually do is resend the same request after a bit and it will work.

If it fails for more than thrice, right now we contact the api support and they are responsive.

sri_gan at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 6
Hi there!

Is there a problem on the msn side today? I am unable to get keyword performance reports for all my accounts/campaigns?

Server was unable to process request. > |-400063|-1|ERROR_API_REPORT_NONE|

Ludo-R at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...

Windows Live Developer Forums

Site Classified