ciao a tutti, utilizzo questo codice per la chiamata alle api di ebay da un paio di mesi, oggi inspiegabilmente ha smesso di funzionare, e ricevo questo messaggio di errore:
SOAP-ERROR: Parsing Schema: unexpected <any> in complexType in /home/mhd-01/www
in rete non sono riuscito a trovare nulla a riguardo, potete aiutarmi?
vi posto il codice completo!
PS: error on line 13codice:<?php function print_d($array){ echo "<pre>\n"; print_r($array); echo "</pre>\n";} $mytoken = "xxx"; $devId = "xxx"; $appId = "xxx"; $certId = "xxx"; $wsdl_url = 'http://developer.ebay.com/webservices/latest/ebaySvc.wsdl'; $from_time='2013-10-12'; $to_time='2013-11-11'; $apiCall = "GetSellerTransactions"; $credentials = array('AppId' => $appId, 'DevID' => $devId, 'AuthCert' => $certId); $client = new SoapClient($wsdl_url, array("trace" => 1, "exceptions" => 0, "location" => "https://api.ebay.com/wsapi?callname=$apiCall&appid=$appId&siteid=0&version=803&Routing=new")); //$client = new SOAPClient($wsdl_url, array('trace' => 1, 'exceptions' => 0, 'location' => "https://api.ebay.com/wsapi?callname=$apiCall&appid=$appId&siteid=0&version=803&Routing=new")); $eBayAuth = array('eBayAuthToken' => new SoapVar($mytoken, XSD_STRING, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents'), 'Credentials' => new SoapVar ($credentials, SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents')); $header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT); $header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents', 'RequesterCredentials', $header_body)); $params = array('Version' => 803, 'DetailLevel' => 'ReturnSummary', 'ModTimeFrom'=>$from_time,'ModTimeTo'=>$to_time,'IncludeContainingOrder'=>'true'); //set the API call parameters $request = $client->__soapCall($apiCall, array($params), NULL, $header); //make the actual API call print_d($request); // print the API call results in a nice readable format //echo "<br><br><br><br>REQUEST:\n" . htmlentities($client->__getLastRequest()) . "\n"; // this lets you view the XML of your last call which can be helpful ?>
codice:$client = new SoapClient($wsdl_url, array("trace" => 1, "exceptions" => 0, "location" => "https://api.ebay.com/wsapi?callname=$apiCall&appid=$appId&siteid=0&version=803&Routing=new"));


Rispondi quotando