Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Wyciąganie danych o paczce GLS
xaitras
post
Post #1





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 27.06.2017

Ostrzeżenie: (0%)
-----


Witam wszystkich forumowiczów. Nie często proszę o pomoc.. tylko kiedy wszystkie próby zawiodą wink.gif

Mam taki skrypt:

  1.  
  2.  
  3. <?php
  4. /* UWAGA: W przykładzie pominęto obsługę błędów! */
  5.  
  6. $hClient = new nusoap_client( 'http://xxx.xxxxxxxx.xx/ade_webapi.php?wsdl', array( 'encoding'=>'UTF-8' ) );
  7. $hClient -> soap_defencoding = 'utf-8';
  8. $hClient -> decode_utf8 = FALSE;
  9.  
  10. $aCMsg = array( 'user_name' => 'moj_user', 'user_password' => 'moj_passwd' );
  11. $aClient = $hClient->call( 'adeLogin', $aCMsg );
  12. $szSession = $aClient[ 'session' ];
  13.  
  14. $aCMsg = array( 'session' => $szSession, 'number' => '62000000519' );
  15. $aClient = $hClient->call( 'adePickup_ParcelNumberSearch', $aCMsg );
  16.  
  17. print_r( $aClient );
  18. // output ->
  19. // Array (
  20. // [rname1] => Pan
  21. // [rname2] => Jan
  22. // [rname3] =>
  23. // [rcountry] => PL
  24. // [rzipcode] => 00-950
  25. // [rcity] => Warszawa
  26. // [rstreet] => ul. Kwieciska 15
  27. // [rphone] => 1500-100-900
  28. // [rcontact] => Antoni
  29. // [references] => by WebAPI
  30. // [notes] => by Thomi (thest 4)
  31. // [quantity] => 2
  32. // [weight] => 16.00
  33. // [date] => 2012-09-17
  34. // [srv_ade] => COD 200.00PLN
  35. // [srv_bool] => Array (
  36. // [cod] => 1 [cod_amount] => 200.00 [exw] => 0 [rod] => 0 [pod] => 0 [exc] => 0 [ident] => 0 [daw] => 0 [ps] => 0 [pr] => 0 [s10] => 0 [s12] => 0 [sat] => 0 [ow] => 0 [srs] = 0)
  37. // [parcels] => Array (
  38. // [0] => Array ( [number] => 62000000519 [reference] => paczka duza [weight] => 15.00 [srv_ade] => COD 200.00PLN
  39. // [srv_bool] => Array ( [cod] => 1 [cod_amount] => 200.00 [exw] => 0 [rod] => 0 [pod] => 0 [exc] => 0
  40. // [ident] => 0 [daw] => 0 [ps] => 0 [pr] => 0 [s10] => 0 [s12] => 0 [sat] => 0 [ow] => 0 [srs] = 0) )
  41. // [1] => Array ( [number] => 62000000520 [reference] => paczka mala [weight] => 1.00 [srv_ade] => COD
  42. // [srv_bool] => Array ( [cod] => 1 [cod_amount] => [exw] => 0 [rod] => 0 [pod] => 0 [exc] => 0
  43. // [ident] => 0 [daw] => 0 [ps] => 0 [pr] => 0 [s10] => 0 [s12] => 0 [sat] => 0 [ow] => 0 [srs] = 0) )
  44. // )
  45. // )
  46.  
  47. $aCMsg = array( 'session' => $szSession );
  48. $aClient = $hClient->call( 'adeLogout', $aCMsg );
  49. ?>


Chcę wyciągnąć informacje o paczce z api gls ale po poprawnym połączeniu z serwerem spotkałem się z takim błędem:

Notice: Undefined index: session in C:\WebServ\httpd\gls_info.php on line 13
Array ( [faultcode] => err_sess_not_found [faultstring] => num: 62000000519 [faultactor] => adePickup_ParcelNumberSearch [detail] => )

Powyższy przykład pochodzi ze strony dokumentacji api gls'u..

Nie mam pojęcia jak to ugryźć.. ktoś pomoże?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 17:33