Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP][WSDL][SOAP] Problem z klientem soap
ddluk
post 9.10.2010, 18:20:35
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 9.10.2010

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


Od kilku dni staram się napisać klienta soap w php. Napisałem kod, który wklejam poniżej.

  1. <?
  2. $params = array('shipmentNumbers' => '11444830370');
  3. $client = new SoapClient('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',array('trace' => true));
  4. try {
  5. $result = $client->GetShipments($params);
  6. } catch (SoapFault $e) {
  7. echo "Error!<br>";
  8. echo "faultcode: " . $e->faultcode . "<br>";
  9. echo "faultstring: " .$e->faultstring. "<br>";
  10. echo "detail: " .$e->detail;
  11. }
  12. ?>
  13. <html>.
  14. <head><title>Soap Test</title></head>
  15. <body>
  16. <?php if ($result) { ?>
  17. Wynik: <?= $result->GetShipmentsResponse ?>
  18. <?php } else { ?>
  19. Problem with conversion.
  20. <?php } ?>
  21. </body>
  22. </html>
  23.  


Czy mógłby ktoś wskazać mi gdzie popełniam błąd? Po wykonaniu skryptu nic się nie dzieje.

Problem został rozwiązany smile.gif Wystarczyło dokonać następującej zmiany:

  1. $params = array('shipmentNumbers' => array('11444830370'));
  2.  




Ten post edytował ddluk 9.10.2010, 18:19:35
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 14.07.2025 - 12:16