Answer the question
In order to leave comments, you need to log in
How can I set the WSS-PasswordType for a SOAP client?
Help, please, to deal with authorization for the SOAP client. How can I specify the WSS-PasswordType:PasswordText parameter for the client and pass it for authorization to the server.
What I tried:
1) I collect the correct structure in XML with my hands and add it as a header through SoapHeader
$header[] = new SoapHeader("http://schemas.xmlsoap.org/ws/2003/06/secext", 'Security', new \SoapVar($xml, XSD_ANYXML), 1);
Answer the question
In order to leave comments, you need to log in
$client = new SoapClient(' magentohost/api/soap/?wsdl ');
// If somestuff requires api authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');
$result = $client->call($session, 'catalog_product.list');
var_dump($result);
// If you don't need the session anymore
// $client->endSession($session);
Something like this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question