私は次のコードでwso2cep-4.1.0のUSERADMIN管理サービスから機能一覧を取得しようとしている:(更新済み)wso2cep-4.1.0からphpとsoapでUserAdminサービスの関数リストを取得するにはどうすればよいですか?
<?php
checkWSDLfunctions();
function checkWSDLfunctions(){
$wsdl = "https://10.69.16.44:9445/services/UserAdmin?wsdl";
$paramtrs = array(
'trace' => true,
'login' => 'admin',
'password' => 'admin',
'keep_alive' => false
);
$client = new SoapClient($wsdl, $paramtrs);
print_r($client->__getFunctions());
}
?>
WSDLは、Webブラウザと問題なくSOAPUI負荷それをから入手可能である、私はapacheの2.0.55とPHP 5.2.9を使用して、私が上で上記のPHPを実行したとき、私はこれを取得:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://10.69.16.44:9445/services/UserAdmin?wsdl' : Start tag expected, '<' not found in C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php:15 Stack trace: #0 C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php(15): SoapClient->SoapClient('https://10.69.1...', Array) #1 C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php(2): checkWSDLfunctions() #2 {main} thrown in C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php on line 15
私は他の質問をチェックし、opensslのが有効になっています。 私はwso2cep 3.1.0からwsdlとまったく同じPHPを試してみました。それは動作します。
あなたは次の試しに何を提案しますか?
ありがとうございました!
敬具、
UPDATE:私は、ファイルwso2.wsdlへのリンクからWSDLを追加することにより、上記の問題の回避策を見つけた、と今__getFunctions()関数はリストを返します関数のwsdlからの。
しかし、私はのはlistUsersを言わせて、WSDLから簡単な関数を呼び出したいときはまだ、私はこのエラーを取得:
Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in C:\Program Files\Apache Group\Apache2\htdocs\CARE.wso2\checkFunctions.php:18 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://10.69.1...', 'urn:listUsers', 1, 0) #1 [internal function]: SoapClient->__call('listUsers', Array) #2 C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php(18): SoapClient->listUsers() #3 C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php(2): checkWSDLfunctions() #4 {main} thrown in C:\Program Files\Apache Group\Apache2\htdocs\wso2\checkFunctions.php on line 18
新しいPHPコードは次のとおりです。
<?php
checkWSDLfunctions();
function checkWSDLfunctions(){
//$wsdl = "https://10.69.16.44:9445/services/UserAdmin?wsdl";
$wsdl = "wso2.wsdl";
$paramtrs = array(
'trace' => true,
'login' => 'admin',
'password' => 'admin',
'keep_alive' => false
);
$client = new SoapClient($wsdl, $paramtrs);
//print_r($client->__getFunctions());
print_r($client->listUsers());
}
?>
私は」私はwso2cepのいくつかの設定を見逃しているかもしれませんが、私はそこで何を変えるべきかわかりません。あなたはここで何が問題だと思いますか?
ありがとうございました!
オイゲン