SOAP problems with magento
Project ID: 1258635632
Project Details
- Status: Closed (Cancelled)
- Posted: 11/19/2009 at 8:00 EST
- Cancelled: 11/26/2009 at 8:05 EST
- Project Creator:
- Budget: N/A
- Description: We have had soap working with magento but has suddenly stopped working and causing errors in our script.
making this call twice seemed to fix the problem to the proxy and sessionID
<?
//$proxy = new SoapClient('http://www.xxx.co.uk/api/soap/?wsdl', array('trace'=>1));
$proxy = new SoapClient('http://www.xxx.co.uk/api/soap/?wsdl');
$sessionId = $proxy->login('xxx', 'xxx');
$row_rsGetOrderInfo=$proxy->call($sessionId, 'sales_order.info', 100000324);
$trackitem_shipmethod=$row_rsGetOrderInfo[shipping_description];
echo "SHIP METHOD: $trackitem_shipmethod<BR><BR>";
//try { $row_rsGetOrderInfo=$proxy->call($sessionId, 'sales_order.info', 100000319); } catch(SoapFault $soapFault){
//echo "<br><br>Fault: " . var_dump($soapFault);
//echo "<br><br>Request :<br>", htmlentities($proxy->__getLastRequest()), "<br>";
//echo "<br><br>Response :<br>", htmlentities($proxy->__getLastResponse()), "<br>";
//}
//$proxy = new SoapClient('http://www.xxx.co.uk/api/soap/?wsdl');
//$sessionId = $proxy->login('xxx', 'xxx');
$row_rsGetOrderInfo=$proxy->call($sessionId, 'sales_order.info', 100000324);
$trackitem_shipmethod=$row_rsGetOrderInfo[shipping_description];
echo "SHIP METHOD: $trackitem_shipmethod<BR><BR>";
?>
We then discovered last night that reinstantiate the SoapClient Object worked but today we have new / more problems with getting soap to work which previously worked:
Just worked out that I only need to reinstantiante the SoapClient object for it to work. I dont even need to log back in to the session.
i.e. I can do this first:
$proxy = new SoapClient('http://www.xxx.co.uk/api/soap/?wsdl');
$sessionId = $proxy->login('xxx', 'xxx');
Then execute a query:
try { $countries = $proxy->call($sessionId, 'country.list'); } catch(Exception $e){ echo "<BR>ERROR Code : " . $e->getCode() . ": " . $e->getMessage(); }
Next time I just:
$proxy = new SoapClient('http://www.xxx.co.uk/api/soap/?wsdl');
then execute another query.
And this works.
Are you there?
I've just recoded all that - run 5 test orders through successfully.
Noticed a small error with the order comments which I fixed.
Went to retest a single order and now getting a different error:
ERROR Code : 0: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.xxx.co.uk/api/soap/?wsdl'Additional Info (Added 11/19/2009 at 10:44 EST)...Really looking for a fix for this today/tomorrow - Tags:
| Project Bids |
| Programmer | Bid |
Delivery Time | Time of Bid | Rating | |
| cannycoder | $180 | 1 day | 11/20/2009 at 0:14 EST | (No Feedback Yet) | |
| ready to work | |||||
| superyetkin | $210 | 6 days | 11/21/2009 at 6:48 EST | (207 reviews) |
|
| I can help you | |||||
| googuname1234 | $239 | 10 days | 11/19/2009 at 14:12 EST | (1 review) |
|
| ready to start, please ping my email address for perfect solution, thanks | |||||
| fallair | $240 | 1 day | 11/19/2009 at 11:40 EST | (9 reviews) |
|
| Pro work. Business days. | |||||
| maborakprogrammer |
$300 | 1 day | 11/19/2009 at 12:47 EST | (136 reviews) |
|
| Zend Engineer Certified, is not hard but time consuming debug SOAP services. escrow needed. | |||||
| nidhi | $450 | 3 days | 11/20/2009 at 1:09 EST | (87 reviews) |
|
| quality work | |||||
| 7even |
$750 | 1 day | 11/19/2009 at 10:08 EST | (191 reviews) |
|






