Overview  Package  Tree HessianPHP

HessianPHP.Server

Class HessianService

HessianPHP.Server.HessianService

class HessianService

Enables a common PHP object to be published as a Hessian compatible web-service via a POST request.

It wraps a PHP object that executes the real methods passed by the HessianService class. Example usage:

$wrapper = &new HessianService();
$wrapper->registerObject(new ServiceObject());
$wrapper->service();

Then clients can perform method calls to the url of the service, ex. http://localhost/hessian/testservice.php TODO:

Author:
Manolo Gómez
Version:
1.0

Field Summary
public var$serviceInfo
public var$fault
public var$writer
public var$parser
public var$displayInfo
public var$errorReporting
private var$_restoreError
Method Summary
public voidHessianService
public voidregisterObject
public voidservice

Publishes the service, check incoming calls and routes them to the wrapped object.
This method uses streams to retrieve raw POST bytes and a "HessianPHP.HessianParser HessianParser" and "HessianPHP.HessianWriter HessianWriter" to execute the call and send results back to the client.

Field Detail

serviceInfo

public var $serviceInfo

fault

public var $fault = false

writer

public var $writer

parser

public var $parser

displayInfo

public var $displayInfo = false

errorReporting

public var $errorReporting

_restoreError

private var $_restoreError
Method Detail

HessianService()

public void HessianService(var $name = '')
Parameters:
$name

registerObject()

public void registerObject(var $service)
Parameters:
$service

service()

public void service()

Publishes the service, check incoming calls and routes them to the wrapped object.
This method uses streams to retrieve raw POST bytes and a "HessianPHP.HessianParser HessianParser" and "HessianPHP.HessianWriter HessianWriter" to execute the call and send results back to the client.

As defined in Hessian 1.0 spec, the service requires POST to execute. It is advised not to call
any other php code that writes to the default screen output (echo, print, etc.) as it can corrupt the reply.


Overview  Package  Tree HessianPHP