0

我正在尝试提供 Web 服务(通过 PHP)。使用 XAMPP 在我的本地系统上一切正常。现在我已将 WSDL 和服务器脚本上传到我的网络服务器。但我无法访问 WSDL 或脚本(通过 SSL)。

我的客户端脚本如下所示:

$client = new SoapClient('https://www.geldfuermuell.info/meineMediaWebservice/webservice.wsdl');
$user = array(
    'steuernummer' => '',
    'lk' => '',
    'uid' => '',
    'firma' => '',
    'nname' => '',
    'vname' => '',
    'strasse' => '',
    'hnr' => 'Hausnummer',
    'plz' => '',
    'ort' => '',
    'land' => '',
    'email' => '',
    'telefon' => '',
    'passwort' => '',
    'pruefziffer' => '',
    'inhaber' => '',
    'konto' => '',
    'blz' => '',
    'institut' => '');

$request = new StdClass();
$request->user = new StdClass();
$request->user->steuernummer = $user['steuernummer'];
$request->user->lk = $user['lk'];
$request->user->uid = $user['uid'];
$request->user->firma = $user['firma'];
$request->user->nname = $user['nname'];
$request->user->vname = $user['vname'];
$request->user->strasse = $user['strasse'];
$request->user->hnr = $user['hnr'];
$request->user->plz = $user['plz'];
$request->user->ort = $user['ort'];
$request->user->land = $user['land'];
$request->user->email = $user['email'];
$request->user->telefon = $user['telefon'];
$request->user->passwort = $user['passwort'];
$request->user->pruefziffer = $user['pruefziffer'];
$request->user->inhaber = $user['inhaber'];
$request->user->konto = $user['konto'];
$request->user->blz = $user['blz'];
$request->user->institut = $user['institut'];

$result = $client->addUser($request);  

我收到以下错误:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.geldfuermuell.info/meineMediaWebservice/webservice.wsdl' : failed to load external entity "https://www.geldfuermuell.info/meineMediaWebservice/webservice.wsdl" in C:\xamppNew\htdocs\experimental\index.php:81 Stack trace: #0 C:\xamppNew\htdocs\experimental\index.php(81): SoapClient->SoapClient('https://www.gel...') #1 {main} thrown in C:\xamppNew\htdocs\experimental\index.php on line 81

(行号不正确)

我也尝试通过加载文件

file_get_contents('https://www.geldfuermuell.info:443/meineMediaWebservice/webservice.wsdl');

结果是:

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112) in C:\xamppNew\htdocs\experimental\index.php on line 77

Warning: file_get_contents(): Failed to enable crypto in C:\xamppNew\htdocs\experimental\index.php on line 77

Warning: file_get_contents(https://www.geldfuermuell.info:443/meineMediaWebservice/webservice.wsdl): failed to open stream: operation failed in C:\xamppNew\htdocs\experimental\index.php on line 77

有人有想法吗?我的错误是什么?

顺便说一句:OpenSSL 已启用 SoapClient 和 SoapServer 已启用

4

0 回答 0