#!/usr/local/bin/php <?php $service = new PlutonService('context'); $service->initialize(); $service->getRequest(); $ctx = $service->getContext("ctx"); $service->sendResponse($ctx); $service->terminate(); # Give plTest a chance to consume the response sleep(2); exit(0);
#!/usr/local/bin/php <?php $service = new PlutonService('getstuff'); $service->initialize(); $service->getRequest(); $sk = $service->getServiceKey(); $sa = $service->getServiceApplication(); $sf = $service->getServiceFunction(); $sv = $service->getServiceVersion(); $serial = $service->getSerializationType(); $cn = $service->getClientName(); $service->sendResponse("sk={$sk} sa={$sa} sf={$sf} sv={$sv} serial={$serial} cn={$cn}\n"); $service->terminate(); # Give plTest a chance to consume the response sleep(2); exit(0);
#!/usr/local/bin/php <?php // Create and initialize the Pluton service. $service = new PlutonService('simple'); $service->initialize(); $api = $service->getAPIVersion(); print "Service API Version: {$api}\n"; if (strlen($api) == 0) { print "Expected a non-zero length api version\n"; exit(1); } // Invoke the call loop. while ($service->getRequest()) { $request = $service->getRequestData(); if (!$service->sendResponse($request)) { $service->sendFault(11, 'sendResponse() failed'); } } if ($service->hasFault()) { error_log('Service had a fault'); } $service->terminate(); print "Terminate complete - about to exit\n"; exit(0);