function testInterSS() { $simq = new SimpleInterSSMQ(); $frame = new MessageFrame(); $frame->body = "hello"; $conf = array("implementation_options" => array("remoteServer" => "http://localhost/test_receiver")); $dummy = $simq->encode("test", $frame, $conf); }
function index() { if (!self::$enabled) { return $this->httpError(404, "There is nothing here"); } $request = $this->getRequest(); if (!$request->isPOST()) { return $this->badRequest(); } // @todo Security checks before we blindly accept a message // @todo includes a configuration test if http and/or https are accepted. // grab the message data $raw = $request->getBody(); try { $inst = new SimpleInterSSMQ(); $inst->processRawMessage($raw); $this->getResponse()->setStatusCode(200); $this->getResponse()->addHeader('Content-Type', "text/plain"); return "ok"; } catch (Exception $e) { throw $e; } }