Hey all, I am writing a script to hit a web service and put the info in to my database, unfortunately, sometimes the soap call comes back with bad headers, and my script stops. Id like to hit the service, and if it comes back with an error, try again 2 more times before giving up, and moving to the next call. I tried something like this do { $response = $client->getProductDetail($objRequest); } while (true == is_soap_fault($response)); to see if it would loop (I know it doesn't try 3 times), but it just gives me the error and stops Im executing this through SSH when I root into my server, so I can echo where I am in the script as it executes, and see where/what the issue is. Any one know how I might achieve this? Thanks!
Your comment got me on the right track to make the script work. I do have one other question, if my php script fails or there is a soap fault, is there a way to make the whole thing restart? I plan on storing the current position of the script in my database, then on error restart, grab the position and continue. Is this possible? I just need to know how to restart the script, the rest I can handle. Thanks!