Seller Account | Community Guidelines | Seller Support Blog | Help


Amazon Seller Community » Developer Support » Amazon Marketplace Web Service (Amazon MWS)

Thread: Problem with GetReportSample

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 10 - Pages: 1 - Last Post: Nov 11, 2009 7:17 AM by: swinginfriar Threads: [ Previous | Next ]
hersheycat

Click to report this message to  Administrator

Report

Posts: 4
Registered: 10/29/09
Problem with GetReportSample
Posted: Oct 29, 2009 8:49 AM

Hello,
I have an issue with using the the file GetReportSample.php.
When i run RequestReportSample.php i see the result with the ReportRequestId.
Then i run GetReportRequestListSample.php and i can see that the ReportRequestId
is _DONE_.
The problem is when i run GetReportSample.php with the relevant ReportRequestId after about 10 seconds i get an error: Caught Exception: Maximum number of retry attempts reached : 4

and all of the fields in the result are empty:
Response Status Code:
Error Code:
Error Type:
Request ID: XML:

I checked .config.inc.php to make sure that all of the configuration is correct and i don't see any problem as other requests from different files work.

I am using the generic PHP library with no changes to the code.
Ohh one more thing, i tried modifying Client.php to disable / Enable SSL support as mentioned in this forum with no help to.

Any suggestions ?

hersheycat

Click to report this message to  Administrator

Report

Posts: 4
Registered: 10/29/09
Re: Problem with GetReportSample
Posted: Oct 29, 2009 12:40 PM   in response to: hersheycat

If it helps in any way, i checked Client.php to see the result i got from curl and the result is just the number 1. When i check any other file i get an XML reply but in this case i just get the number 1.

??

dtext01

Click to report this message to  Administrator

Report

Posts: 5
Registered: 10/21/09
Re: Problem with GetReportSample
Posted: Nov 3, 2009 12:39 PM   in response to: hersheycat

I am periodically getting the same problem. I am guessing that it may have to do with the throtteling requirements. Only 60 report downloads per hour are allowed. I don't think I hit this, but since there is no sandbox (that I know of) to test in...

amazondevsupport

Click to report this message to  Administrator

Report

Posts: 106
Registered: 4/13/09
Re: Problem with GetReportSample
Posted: Nov 4, 2009 9:39 AM   in response to: dtext01

When you exceed your throttling limits for a particular API operation, an HTTP 503 response is sent from MWS. The PHP client library currently has retry logic for an event when a 500 or 503 response is received. Once you've reached the maximum configured retry number (configurable in the config hash used in the library's construction), the exception above is thrown.

This is a bug in the PHP client library code, as there should not be any retry attempts for throttled requests. We will publish a fix in the coming days.

We apologize for the inconvenience.

hersheycat

Click to report this message to  Administrator

Report

Posts: 4
Registered: 10/29/09
Re: Problem with GetReportSample
Posted: Nov 4, 2009 2:01 PM   in response to: hersheycat

Hi,
Thank you for the reply, but the answer doesn't really address my problem.
why does the GetReportSample.php fail when all other files work ?
I doubt that we exceed throttling limits for that particular API operation.

What can we do to solve this ? or better debug ?

Also any explanation for the number 1 result ?

Thanks for your assistance.

hersheycat

Click to report this message to  Administrator

Report

Posts: 4
Registered: 10/29/09
Re: Problem with GetReportSample
Posted: Nov 4, 2009 4:28 PM   in response to: hersheycat

Further more we have checked the HTTP code we get back from curl to see what response we get back from the server.
On every other file we run (GetReportListSample.php, GetReportRequestListSample.php) we get response code 200 only when we run GetReportSample.php we get a response code 400.

Any suggestions ?

swinginfriar

Click to report this message to  Administrator

Report

Posts: 6
Registered: 10/24/09
Re: Problem with GetReportSample
Posted: Nov 5, 2009 8:38 PM   in response to: hersheycat

I'm having the exact same problem as Hershey. It's can't be a throttling limitation since it always happens, and only with GetReportSample.php.

Herhey- how are you checking the http response from curl?

swinginfriar

Click to report this message to  Administrator

Report

Posts: 6
Registered: 10/24/09
Re: Problem with GetReportSample
Posted: Nov 8, 2009 1:03 PM   in response to: swinginfriar

Nevermind, I realized from another thread that the ReportRequestID is not the same thing as the ReportID.

However, I can't figure out how to structure the GetReportRequestList query using the ReportRequestID to retrieve the actual ReportID.

help anyone?

swinginfriar

Click to report this message to  Administrator

Report

Posts: 6
Registered: 10/24/09
Re: Problem with GetReportSample
Posted: Nov 8, 2009 9:58 PM   in response to: swinginfriar

Let me elaborate on my previous question-

When working with the GetReportListSample.php, what is the proper way to structure it for a specific ReportRequestId?

$request = new MarketplaceWebService_Model_GetReportRequestListRequest();
$request->setMarketplace(MARKETPLACE_ID);
$request->setMerchant(MERCHANT_ID);
$request->setReportRequestIdList('2763466278');

invokeGetReportRequestList($service, $request);

This leads to php error:
Fatal error: Call to a member function getId() on a non-object in...MarketplaceWebService\Client.php on line 1667

Any help would be appreciated.

Thanks.

ative

Click to report this message to  Administrator

Report

Posts: 2
Registered: 11/4/09
Re: Problem with GetReportSample
Posted: Nov 9, 2009 7:58 AM   in response to: swinginfriar

swinginfriar,

I've had all the same struggles as you and I believe I've solved your/our problem.

I found hints to the solution in the "UpdateReportAcknowledgementsSample.php" file.

Here is the solution I came up with for GetReportListSample.php:

$reportId = '1234567890';

$request = new MarketplaceWebService_Model_GetReportListRequest();
$request->setMarketplace(MARKETPLACE_ID);
$request->setMerchant(MERCHANT_ID);

$idList = new MarketplaceWebService_Model_IdList();
$request->setReportRequestIdList($idList->withId('2764276740'));

invokeGetReportList($service, $request);

Enjoy!


Regards,
Chris

swinginfriar

Click to report this message to  Administrator

Report

Posts: 6
Registered: 10/24/09
Re: Problem with GetReportSample
Posted: Nov 9, 2009 8:44 AM   in response to: ative

Thanks Chris, this is exactly what I was looking for. I couldn't find this documented anywhere, so I really appreciate the help.

Legend
Amazonian
Helpful Answer
Correct Answer






Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates