15 years ago
PHP SOAP lib AuthenticationManager parameter UserInformation
Dear Commuinity,
i was wondering anyone could help me out getting a valid Request (XML) from my SOAPUI Webservice.
How should i send User and Passwort Parameters via PHP SOAP lib to the Webservice?
The example __call is sendCompany
Aren't the parameters for Userinformation completle wrong? Have already tried more variations like Userinformation, User, loginetc.
My PHP code:
My Error request:
stdClass Object
(
[information] => stdClass Object
(
[informationType] => Error
[message] => The parameter UserInformation is null (modul AuthenticationManager).
[messageCode] => SystemExeption
[messageTemplate] => The parameter %s is null (modul %s).
[parameters] => Array
(
[0] => UserInformation
[1] => AuthenticationManager
)
[stackTrace] => stdClass Object
i was wondering anyone could help me out getting a valid Request (XML) from my SOAPUI Webservice.
How should i send User and Passwort Parameters via PHP SOAP lib to the Webservice?
The example __call is sendCompany
Aren't the parameters for Userinformation completle wrong? Have already tried more variations like Userinformation, User, loginetc.
My PHP code:
<?php
$option=array('trace'=>1);
$soapClient = new SoapClient('http://webservice......de/WFSService/WFSWebService?wsdl', $option);
$headers = array('user' => 'guest', 'password' => 'guest');
$header = new SoapHeader('http://my_accessdomain_or_IP', 'AuthenticationDTO', $headers, false);
$soapClient->__setSoapHeaders($header);
$params = array('pageSize'=>20, 'pageNumber' => 1, 'loadAllData'=> false);
try {
$result = $soapClient->__call("searchCompany", $params);
print_r($result);
} catch (SoapFault $fault) {
echo $fault->faultcode . "-" . $fault->faultstring;
echo "REQUEST:\n" . htmlentities($soapClient->__getLastRequest()) . "\n";
}
?>
My Error request:
stdClass Object
(
[information] => stdClass Object
(
[informationType] => Error
[message] => The parameter UserInformation is null (modul AuthenticationManager).
[messageCode] => SystemExeption
[messageTemplate] => The parameter %s is null (modul %s).
[parameters] => Array
(
[0] => UserInformation
[1] => AuthenticationManager
)
[stackTrace] => stdClass Object