Ejemplo n.º 1
0
 function bss_soap_client($servicename)
 {
     parent::nusoap_client(bss_soap_client::getBaseUrl() . $servicename . '/v1.3/BASIC?wsdl', true);
     $this->setCredentials(bss_soap_client::getUsername(), bss_soap_client::getPassword(), 'basic', array());
 }
Ejemplo n.º 2
0
        <td><input id="id_baseUrl" type="text" name="baseUrl" value="<?php 
echo bss_soap_client::getBaseUrl();
?>
"/></td>
      </tr>
      <tr>
        <td>User Name</td>
        <td><input type="text" name="username" value="<?php 
echo bss_soap_client::getUsername();
?>
"/></td>
      </tr>
      <tr>
        <td>Password</td>
        <td><input type="password" name="password" value="<?php 
echo bss_soap_client::getPassword();
?>
"/></td>
      </tr>
      <tr>
        <td>Authentication</td>
        <td>
          <select name="authentication">
            <option>BASICAUTH</option>
            <option>CLIENTCERT</option>
          </select>
        </td>
      </tr>
    </tbody>
  </table>
  <input id="btn_save" type="submit" value="Save"/>
Ejemplo n.º 3
0
<?php

require_once 'bss_soap_client.php';
require_once 'log.php';
require_once 'OperationRegistry.php';
// retrieve the operation
$op = OperationRegistry::get($_REQUEST['operation']);
// create and initialize operation parameters
$params = array();
if ($op->service == 'EventService') {
    $params = '<ns2:recordEventForSubscription xmlns:ns2="http://oscm.org/v1.3">' . '<subscriptionKey>' . $_REQUEST['subscriptionKey'] . '</subscriptionKey>' . '<event>' . '<ns2:actor>' . $_REQUEST['actor'] . '</ns2:actor>' . '<ns2:eventId>' . $_REQUEST['eventId'] . '</ns2:eventId>' . '<ns2:multiplier>' . $_REQUEST['multiplier'] . '</ns2:multiplier>' . '<ns2:occurrenceTime>' . $_REQUEST['occurrenceTime'] . '</ns2:occurrenceTime>' . '</event>' . '</ns2:recordEventForSubscription>';
} else {
    if ($op->service == 'SessionService') {
        $params = array('subscriptionKey' => $_REQUEST['subscriptionKey'], 'sessionId' => $_REQUEST['sessionId']);
        if ($op->method == 'resolveUserToken') {
            $params['userToken'] = $_REQUEST['userToken'];
        }
    }
}
// create soap client and execute request
$client = new bss_soap_client($op->service);
$result = $client->call($op->method, $params);
if ($client->getError()) {
    logRequest($op->name, false, $params, $client->getError());
} else {
    if (is_string($params)) {
        $params = array(str_replace('&gt;&lt;', '&gt;<br/>&lt;', htmlspecialchars($params)));
    }
    logRequest($op->name, false, $params, $result['return']);
}
include 'requests.php';
Ejemplo n.º 4
0
<?php

require_once 'bss_soap_client.php';
require_once 'log.php';
$service = "SessionService";
$method = "resolveUserToken";
$params = array('subscriptionKey' => $_REQUEST['subKey'], 'sessionId' => $_REQUEST['bssId'], 'userToken' => $_REQUEST['usertoken']);
$client = new bss_soap_client($service);
$result = $client->call($method, $params);
if ($client->getError()) {
    logRequest("{$service}.{$method}", false, $params, $client->getError());
} else {
    logRequest("{$service}.{$method}", false, $params, $result["return"]);
}
include "index.php";