您的位置:首页 > 编程语言 > PHP开发

通过PHP SOAP Client调用OBIEE WebService的例子

2010-03-08 16:50 441 查看
网上能找到一些用Java, .Net 或者C#写的调用OBIEE WebService的例子,没找到用PHP写的。但是官方文档有写到:Oracle BI Web Services is an application programming interface (API) that implements SOAP. 所以肯定也可以用PHP来调用。本文就是用PHP来调用的一个简单的例子。

<?php
$client = new SoapClient('http://url:port/analytics/saw.dll?WSDL');
$option = array(
'name'=>"UserName",
'password'=>"Password");
$session = $client->__call('logon',array($option));
$session_id = $session->sessionID;
$sql = 'OBIEE Answer Logic SQL';
$executionOptions = array(
'async'=> false,
'maxRowsPerPage'=> 100,
'refresh'=> true,
'presentationInfo'=> true,
'type'=> 'foo2');
$para = array(
'sql'=> $sql,
'outputFormat'=> "SAWRowsetSchemaAndData",
'executionOptions'=> $executionOptions,
'sessionID'=> $session_id
);
$result = $client->__call('executeSQLQuery',array($para));
$rowset = $result->return->rowset;
$client->__call('logoff',array($session_id));
?>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: