3 class FreesideSelfService {
6 function FreesideSelfService() {
7 $this->URL = 'http://' . variable_get('freeside_hostname','') . ':8080';
11 public function __call($name, $arguments) {
13 error_log("[FreesideSelfService] $name called, sending to ". $this->URL);
15 $request = xmlrpc_encode_request("FS.ClientAPI_XMLRPC.$name", $arguments);
16 $context = stream_context_create( array( 'http' => array(
18 'header' => "Content-Type: text/xml",
21 $file = file_get_contents($this->URL, false, $context);
22 $response = xmlrpc_decode($file);
23 if (xmlrpc_is_fault($response)) {
24 trigger_error("[FreesideSelfService] XML-RPC communication error: $response[faultString] ($response[faultCode])");
26 //error_log("[FreesideSelfService] $response");