|
static | testConnection (string $a_ext_uid, string $a_soap_pw, bool $a_new_user) |
|
Definition at line 22 of file class.ilSOAPAuth.php.
◆ testConnection()
static ilSOAPAuth::testConnection |
( |
string |
$a_ext_uid, |
|
|
string |
$a_soap_pw, |
|
|
bool |
$a_new_user |
|
) |
| |
|
static |
Definition at line 24 of file class.ilSOAPAuth.php.
References $ilSetting, $namespace, ILIAS\LTI\ToolProvider\$settings, $valid, and ILIAS\Repository\int().
Referenced by ilObjAuthSettingsGUI\testSoapAuthConnectionObject().
30 $server_hostname = (string) (
$settings[
"soap_auth_server"] ??
'');
32 $server_uri = (string) (
$settings[
"soap_auth_uri"] ??
'');
34 $use_dotnet = (bool) (
$settings[
"soap_auth_use_dotnet"] ??
false);
40 $uri .= $server_hostname;
42 if ($server_port > 0) {
43 $uri .=
":" . $server_port;
46 if ($server_uri !==
"") {
47 $uri .=
"/" . $server_uri;
50 require_once
'./webservice/soap/lib/nusoap.php';
52 if ($err = $soap_client->getError()) {
53 return "SOAP Authentication Initialisation Error: " . $err;
63 $valid = $soap_client->call(
66 $nspref .
'ext_uid' => $a_ext_uid,
67 $nspref .
'soap_pw' => $a_soap_pw,
68 $nspref .
'new_user' => $a_new_user
76 '<br><pre>' . htmlspecialchars(str_replace(
"\" ",
"\"\n ", str_replace(
">",
">\n", $soap_client->request)), ENT_QUOTES) .
'</pre><br>' .
77 "<br>== Response ==" .
78 "<br>Valid: -" .
$valid[
"valid"] .
"-" .
79 '<br><pre>' . htmlspecialchars(str_replace(
"\" ",
"\"\n ", str_replace(
">",
">\n", $soap_client->response)), ENT_QUOTES) .
'</pre>';
if($err=$client->getError()) $namespace
[nu]soapclient higher level class for easy usage.
The documentation for this class was generated from the following file: