Witam

Napisałem skrypt do pobierania danych z eBay przez SOAP ale mam problem.

  1. <?
  2. include("lib/nusoap.php");
  3.  
  4. $token = 'tu token z eBay';
  5. $devId = '1 kod z ebay';
  6. $appId = '2 kod z ebay';
  7. $certId = '3 kod z ebay';
  8.  
  9. $wsdl_url = 'http://developer.ebay.com/webservices/393/eBaySvc.wsdl';
  10. $client = new SOAPClient($wsdl_url, array('trace' => 1, 'exceptions'
  11. => 0, ));
  12.  
  13. class eBayAuth {
  14. function __construct($token, $dev, $app, $cert) {
  15. $credentials = new eBayCredentials($dev, $app, $cert);
  16. $this->eBayAuthToken = new SoapVar($token, XSD_STRING,
  17. NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents');
  18. $this->Credentials = new SoapVar($credentials,
  19. SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents');
  20. }
  21. }
  22.  
  23. class eBayCredentials {
  24. function __construct($dev, $app, $cert) {
  25. $this->AppId  = $app;
  26. $this->DevID  = $dev;
  27. $this->AuthCert = $cert;
  28. }
  29. }
  30.  
  31. $eBayAuth = new eBayAuth($token, $devId, $appId, $certId);
  32. $header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT);
  33.  
  34. $header = array(new SOAPHeader('urn:ebay:api:eBLBaseComponents',
  35. 'RequesterCredentials', $header_body));
  36.  
  37. $params = array('Version' => 393, 'DetailLevel' => 'ReturnAll', 'UserID' => 'login z eBay');
  38.  
  39. $user = $client->__call('GetFeedback', $params, NULL, $header);
  40.  
  41. print_r($user);
  42. ?>


Można czymś zastąpić funkcje SoapVar? Ponieważ jak się nie myle tylko w php5.

Dziękuję za odpowiedzi