Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> zapytanie SOAP w php
maksik
post 21.01.2015, 15:40:13
Post #1





Grupa: Zarejestrowani
Postów: 206
Pomógł: 0
Dołączył: 26.09.2012

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


metodą "GetUnsentProductData" muszę połączyć się SOAP opartą w PHP
http://bit.ly/1xy4iNe

z adresem
https://www.i-label.net/partners/webservice...tdata.asmx?WSDL

przekazując zmienną "ExternalCallerId" aby otrzymać odpowiedź


próbowałem najprostszej metody znalezionej w google ale nie pomogło

  1. <?php
  2.  
  3. $client = new SoapClient("https://www.i-label.net/partners/webservices/datafeedbasic/extractdata.asmx?WSDL");
  4. $result = $client->GetUnsentProductData(array('ExternalCallerId' => 'KEY'));
  5.  
  6. print_r($result);
  7.  
  8. ?>


Czy wie ktoś jak to można rozwiązać?

Ten post edytował maksik 21.01.2015, 15:45:44
Go to the top of the page
+Quote Post
Pyton_000
post 21.01.2015, 15:47:10
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


http://php.net/manual/en/soapclient.getlastresponse.php

i co dostajesz w result
Go to the top of the page
+Quote Post
maksik
post 21.01.2015, 15:55:46
Post #3





Grupa: Zarejestrowani
Postów: 206
Pomógł: 0
Dołączył: 26.09.2012

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


komunikat pojawiający się

  1. Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.i-label.net/partners/webservices/datafeedbasic/extractdata.asmx?WSDLl' : Premature end of data in tag html line 3 in /public/index.php:5 Stack trace: #0 /public/index.php(5): SoapClient->SoapClient('https://www.i-l...', Array) #1 {main} thrown in /public/index.php on line 5
Go to the top of the page
+Quote Post
morthan
post 21.01.2015, 16:13:07
Post #4





Grupa: Zarejestrowani
Postów: 50
Pomógł: 4
Dołączył: 15.06.2010

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


  1. $client = new SoapClient("https://www.i-label.net/partners/webservices/datafeedbasic/extractdata.asmx?WSDL", array('trece' => true));
  2.  
  3. $authData = new stdClass();
  4. $authData->ExternalCallerId = 'guid';
  5. $authHeader = new SoapHeader('http://www.i-label.net/Partners/WebServices/DataFeed/2005/11', 'ExternalCallerHeader', $authData);
  6. $client->__setSoapHeaders(array($authHeader));
  7.  
  8. $client->__soapCall('GetUnsentProductData', array('ExternalCallerId' => 'guid'));
  9. echo "<pre>";
  10. print_r($client->__getFunctions());
  11. print_r($client->__getLastResponse());
  12. print_r($client->__getLastRequest());


[Edit] Poniższy opis wink.gif

Nie wnikam dalej co to za identyfikator itd. Ogólnie dostałe błąd, że podałem nieprawidłowy. Co robią poszczególne komendy doczytaj w namualu.
Szczególnie zwróć uwagę co robi to ustrojstwo
  1. array('trece' => true)





Ten post edytował morthan 21.01.2015, 16:30:52
Go to the top of the page
+Quote Post
maksik
post 21.01.2015, 16:35:06
Post #5





Grupa: Zarejestrowani
Postów: 206
Pomógł: 0
Dołączył: 26.09.2012

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


Otrzymuję te odpowiedź, ale to jeszcze nie jest ta zawartość
  1. (
  2. [0] => GetUnsentProductDataResponse GetUnsentProductData(GetUnsentProductData $parameters)
  3. [1] => GetProductDataForGTINsResponse GetProductDataForGTINs(GetProductDataForGTINs $parameters)
  4. [2] => AcknowledgeMessageResponse AcknowledgeMessage(AcknowledgeMessage $parameters)
  5. [3] => GetUnsentProductDataResponse GetUnsentProductData(GetUnsentProductData $parameters)
  6. [4] => GetProductDataForGTINsResponse GetProductDataForGTINs(GetProductDataForGTINs $parameters)
  7. [5] => AcknowledgeMessageResponse AcknowledgeMessage(AcknowledgeMessage $parameters)
  8. )


Ten post edytował maksik 21.01.2015, 16:35:17
Go to the top of the page
+Quote Post
morthan
post 21.01.2015, 16:37:22
Post #6





Grupa: Zarejestrowani
Postów: 50
Pomógł: 4
Dołączył: 15.06.2010

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


Pisałem byś doczytał w manualu co jest co.

To co dajesz to zestaw funkcji dla tego klienta, i znaczy tyle że połaczyłeś się pawidłowo wink.gif

MANUAL nie gryzie, choć czasem głowa boli od nadmiaru wiedzy smile.gif

[EDIT]

Masz identyfikator GUID??

Ten post edytował morthan 21.01.2015, 16:41:50
Go to the top of the page
+Quote Post
maksik
post 22.01.2015, 14:22:25
Post #7





Grupa: Zarejestrowani
Postów: 206
Pomógł: 0
Dołączył: 26.09.2012

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


  1. $client = new SoapClient("https://www.i-label.net/partners/webservices/datafeedbasic/extractdata.asmx?WSDL", array('trece' => true));
  2.  
  3. $authData = new stdClass();
  4. $authData->ExternalCallerId = 'guid';
  5. $authHeader = new SoapHeader('http://www.i-label.net/Partners/WebServices/DataFeed/2005/11', 'ExternalCallerHeader', $authData);
  6. $client->__setSoapHeaders(array($authHeader));
  7.  
  8. $client->__soapCall('GetUnsentProductData', array('ExternalCallerId' => 'guid'));
  9. echo "<pre>";
  10. print_r($client->__getFunctions());
  11. print_r($client->__getLastResponse());
  12. print_r($client->__getLastRequest());


Jak wykorzystać te motodę do wyciągnięcia parametru GetUnsentProductData?

Ten post edytował maksik 22.01.2015, 15:02:30
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: 16.07.2025 - 19:30