
Temat wydaje się dość prosty jednak nie dla mnie.
SOAP - korzystam z biblioteki nusoap... Aby pobrać jakiekolwiek dane najpierw logowania i mam sobie metodę : doAuth.
POST /_admin/Api/connector.asmx HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <doAuth xmlns="http://api.xxxxx.pl"> <uid>string</uid> <password>string</password> </doAuth> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Header> <ConnectorAuth xmlns="http://api.xxxxxxx.pl"> <Hash>string</Hash> <Create>dateTime</Create> </ConnectorAuth> </soap12:Header> <soap12:Body> <doAuthResponse xmlns="http://api.xxxxxx.pl"> <doAuthResult>boolean</doAuthResult> </doAuthResponse> </soap12:Body> </soap12:Envelope>
KOD
require_once('lib/nusoap.php'); $wsdl = 'https://xxxxxxxxxx.pl/_admin/Api/connector.asmx?WSDL'; $client = new nusoap_client($wsdl, 'wsdl'); $response = $client->call('doAuth', $params);
Zwrotnie dostaje że jest ok - ale w czym rzecz że jak próbuje pod spodem wywołać inną metodę to mówi że nie zalogowany.
np:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ConnectorAuth xmlns="http://xxxxxxxxxxxxxx.pl"> <Hash>string</Hash> <Create>dateTime</Create> </ConnectorAuth> </soap:Header> <soap:Body> <getOrderList xmlns="http://api.xxxxxxxxxxx.pl"> <addedBefore>dateTime</addedBefore> <orderState>int</orderState> <page>int</page> <pageSize>int</pageSize> </getOrderList> </soap:Body> </soap:Envelope>
Problem jest w tym: ConnectorAuth gdzie nie potrafię przenieść do następnej metody Hash który został wygenerowany przy metodzie doAuth jako zalogowany.
A może jeszcze inaczej jak mogę pobrać HEADER z Hash i Data aby poźniej je wykorzystać do innych metod
Podbije temat - bo nie dostałem żadnej odpowiedzi a nie ukrywam potrzebuję waszej pomocy
