Forum Moderators: coopster

Message Too Old, No Replies

Any Pear SOAP experts here?

Got a question about an error with Amazon web services

         

shrirch

2:59 pm on Aug 13, 2003 (gmt 0)

10+ Year Member



I've got a couple of questions about an error message I get.

Can anyone here help me and point out what could be wrong?

The code is

=======
require_once 'SOAP/Client.php';
$debug =1;
$wsdl_url =
'http://soap.amazon.com/schemas3/AmazonWebServices.wsdl';
$WSDL = new SOAP_WSDL($wsdl_url);
$client = $WSDL->getProxy();

$params = array(
'mode' => 'photo',
'page' => 1,
'type' => 'lite',
'browse_node' => '499108',
'tag' => 'deleted-20',
'devtag' => 'deleted',
);

$amazon_products = $client->BrowseNodeSearchRequest($params);

if ($debug == 1) {
print_r($amazon_products);
}
============

The error happens once every three or four requests (which means about 33-25% of my data could potentially be inaccurate).

============
<snip>

[edited by: jatar_k at 11:10 pm (utc) on Aug. 13, 2003]
[edit reason] see sticky [/edit]

lorax

5:15 pm on Aug 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't know SOAP as well as I'd like to but I'd hazard to guess it's a timeout issue. And this is a guess. Could be at either end of the communication.

Does Amazon have a tech support area for PEAR SOAP users? You might want to see if they have any documentation there.

shrirch

10:42 pm on Aug 13, 2003 (gmt 0)

10+ Year Member



I've put a loop around the call to try every 2 seconds for a maximum of 5 attempts and it seems to work more reliably.

Thanks!

jonknee

8:44 pm on Aug 14, 2003 (gmt 0)

10+ Year Member



You shouldn't be getting *that* many timeouts... Maybe try upping the time your code is willing to wait for a response. And add in a condition to handle errors gracefully (AKA "couldn't contact Amazon at this time").