Openmeetings の SOAP API で冒険しています。これは SOAP を使った初めてのロデオなので、ここでの解決策が明白に思えても心配しないでください。
とにかく、次のスクリプトでセッション ID を取得しようとしています。
<?php
$wsdl = "http://localhost:5080/openmeetings/services/UserService?wsdl";
$session = new SoapClient($wsdl, array("trace" =>1, "exceptions"=>0));
$value = $session->getSession();
$xml = $value->getSessionResponse;
$ssid = $xml->session_id;
print "<br/>\n SSID: $ssid";
?>
しかし、次のエラーが発生します。
Notice: 未定義のプロパティ: 5 行目の /home/sam/www/soap.php の stdClass::$getSessionResponse
Notice: 6 行目の /home/sam/www/soap.php で非オブジェクトのプロパティを取得しようとしています
soapUI を使用すると、次のものが送信されていることがわかります。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.axis.openmeetings.apache.org">
<soapenv:Header/>
<soapenv:Body>
<ser:getSession/>
</soapenv:Body>
</soapenv:Envelope>
それをsoapUIで実行すると、次のものが返されます(これには、必要なものがすべて含まれています):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getSessionResponse xmlns:ns="http://services.axis.openmeetings.apache.org">
<ns:return xsi:type="ax22:Sessiondata" xmlns:ax27="http://asterisk.sip.beans.persistence.openmeetings.apache.org/xsd" xmlns:ax213="http://basic.beans.data.openmeetings.apache.org/xsd" xmlns:ax24="http://domain.beans.persistence.openmeetings.apache.org/xsd" xmlns:ax21="http://user.beans.persistence.openmeetings.apache.org/xsd" xmlns:ax22="http://basic.beans.persistence.openmeetings.apache.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ax22:id>14</ax22:id>
<ax22:language_id xsi:nil="true"/>
<ax22:organization_id xsi:nil="true"/>
<ax22:refresh_time>2013-09-26</ax22:refresh_time>
<ax22:sessionXml xsi:nil="true"/>
<ax22:session_id>90a4d3dc876460e119d068969def236c</ax22:session_id>
<ax22:starttermin_time>2013-09-26</ax22:starttermin_time>
<ax22:storePermanent xsi:nil="true"/>
<ax22:user_id xsi:nil="true"/>
</ns:return>
</ns:getSessionResponse>
</soapenv:Body>
</soapenv:Envelope
soapUI が動作するので、使用している URL が正しく、API がしっかりしていると確信しています。私のPHPでどこが間違っているのか誰でも見つけることができますか?
参考までに、Openmeetings の SOAP API ドキュメントはこちらにあります。 誰かがそれを有用または興味深いと思うかもしれない場合に備えて。
エラーを検出できる人、またはその問題を解決してくれる人に、事前に感謝します。