Comments: on this page. Click to read or post your own.

Class SOAPModelAccess

Description

Basic SOAP Server to access and modify DataObject instances.

You can enable SOAP access on a DataObject by setting DataObject::$api_access to true.

Usage - Getting a record:

  1.  $c new SoapClient('http://mysite.com/soap/v1/wsdl');
  2.  echo $c->getXML("MyClassName"99)// gets record #99 as xml

Usage - Updating a record:

  1.  $c new SoapClient('http://mysite.com/soap/v1/wsdl');
  2.  $data array('MyProperty' => 'MyUpdatedValue');
  3.  echo $c->putXML("MyClassName"99null$data);

Usage - Creating a record:

  1.  $c new SoapClient('http://mysite.com/soap/v1/wsdl');
  2.  $data array('MyProperty' => 'MyValue');
  3.  echo $c->putXML("MyClassName"nullnull$data);

Usage - Creating a record:

  1.  $c new SoapClient('http://mysite.com/soap/v1/wsdl');
  2.  echo $c->deleteXML("MyClassName");

  • todo: Test relation methods

Located in /sapphire/api/SOAPModelAccess.php (line 37)

Object
   |
   --ViewableData
      |
      --RequestHandlingData
         |
         --Controller
            |
            --SapphireSoapServer
               |
               --SOAPModelAccess
Variable Summary
static mixed $methods
Method Summary
void authenticate (string $username, string $password)
string buildRestfulURL (string $class, Number $id, string $relation, string $extension)
string deleteJSON (string $class, Number $id, [string $relation = false], [string $username = null], [string $password = null])
string deleteXML (string $class, Number $id, [string $relation = false], [string $username = null], [string $password = null])
string getErrorMessage (HTTPResponse $response)
string getJSON (string $class, Number $id, [string $relation = false], [string $username = null], [string $password = null])
string getXML (string $class, Number $id, [string $relation = false], [ $username = null], [ $password = null])
void Link ()
string putJSON ([string $class = false], [Number $id = false], [string $relation = false], array $data, [string $username = null], [string $password = null])
string putXML (string $class, [Number $id = false], [string $relation = false], array $data, [string $username = null], [string $password = null])
Variables
static mixed $methods = array(
'getXML' => array(
'class' => 'string',
'id' => 'int',
'relation' => 'string',
'_returns' => 'string',
),'getJSON'=>array('class'=>'string','id'=>'int','relation'=>'string','_returns'=>'string',),'putXML'=>array('class'=>'string','id'=>'int','relation'=>'string','data'=>'string','username'=>'string','password'=>'string','_returns'=>'boolean',),'putJSON'=>array('class'=>'string','id'=>'int','relation'=>'string','_returns'=>'boolean',),)
(line 39)
  • access: public

Redefinition of:
SapphireSoapServer::$methods

Inherited Variables

Inherited from SapphireSoapServer

SapphireSoapServer::$xsd_types

Inherited from Controller

Controller::$action
Controller::$allowed_actions
Controller::$baseInitCalled
Controller::$basicAuthEnabled
Controller::$controller_stack
Controller::$request
Controller::$requestParams
Controller::$response
Controller::$session
Controller::$urlParams
Controller::$url_handlers

Inherited from ViewableData

ViewableData::$casting
ViewableData::$castingHelperPair_cache
ViewableData::$customisedObj
ViewableData::$failover
ViewableData::$iteratorPos
ViewableData::$iteratorTotalItems
ViewableData::$namedAs
ViewableData::$parent
ViewableData::$_natural_cache
ViewableData::$_object_cache
ViewableData::$_xml_cache

Inherited from Object

Object::$builtInMethods
Object::$class
Object::$classConstructed
Object::$extensions
Object::$extension_instances
Object::$extraMethods
Object::$extraStatics
Object::$statics
Object::$static_cached
Methods
authenticate (line 220)

Faking an HTTP Basicauth login in the PHP environment that RestfulServer can pick up.

  • access: protected
void authenticate (string $username, string $password)
  • string $username: Username
  • string $password: Plaintext password
buildRestfulURL (line 232)
  • access: protected
string buildRestfulURL (string $class, Number $id, string $relation, string $extension)
  • string $class
  • Number $id
  • string $relation
  • string $extension
deleteJSON (line 200)

Used to emulate RESTful DELETE requests.

string deleteJSON (string $class, Number $id, [string $relation = false], [string $username = null], [string $password = null])
  • string $class
  • Number $id
  • string $relation: Relation name
  • string $username
  • string $password
deleteXML (line 177)

Used to emulate RESTful DELETE requests.

string deleteXML (string $class, Number $id, [string $relation = false], [string $username = null], [string $password = null])
  • string $class
  • Number $id
  • string $relation: Relation name
  • string $username
  • string $password
getErrorMessage (line 244)
  • return: XML string containing the HTTP error message
  • access: protected
string getErrorMessage (HTTPResponse $response)
getJSON (line 104)

Used to emulate RESTful GET requests with JSON data.

string getJSON (string $class, Number $id, [string $relation = false], [string $username = null], [string $password = null])
  • string $class
  • Number $id
  • string $relation: Relation name
  • string $username
  • string $password
getXML (line 81)

Used to emulate RESTful GET requests with XML data.

string getXML (string $class, Number $id, [string $relation = false], [ $username = null], [ $password = null])
  • string $class
  • Number $id
  • string $relation: Relation name
  • $username
  • $password
Link (line 69)
void Link ()
putJSON (line 153)

Used to emulate RESTful POST and PUT requests with JSON data.

string putJSON ([string $class = false], [Number $id = false], [string $relation = false], array $data, [string $username = null], [string $password = null])
  • string $class
  • Number $id
  • string $relation: Relation name
  • array $data
  • string $username
  • string $password
putXML (line 128)

Used to emulate RESTful POST and PUT requests with XML data.

string putXML (string $class, [Number $id = false], [string $relation = false], array $data, [string $username = null], [string $password = null])
  • string $class
  • Number $id
  • string $relation: Relation name
  • array $data
  • string $username
  • string $password

Inherited Methods

Inherited From SapphireSoapServer

SapphireSoapServer::getWSDLURL()
SapphireSoapServer::index()
SapphireSoapServer::Methods()
SapphireSoapServer::ServiceURL()
SapphireSoapServer::TargetNamespace()
SapphireSoapServer::wsdl()

Inherited From Controller

Controller::AbsoluteLink()
Controller::can()
Controller::curr()
Controller::CurrentMember()
Controller::defaultAction()
Controller::disableBasicAuth()
Controller::getAction()
Controller::getFormOwner()
Controller::getRequest()
Controller::getResponse()
Controller::getSession()
Controller::getURLParams()
Controller::getViewer()
Controller::handleAction()
Controller::handleRequest()
Controller::has_curr()
Controller::init()
Controller::isAjax()
Controller::join_links()
Controller::Now()
Controller::PastMember()
Controller::PastVisitor()
Controller::popCurrent()
Controller::pushCurrent()
Controller::redirect()
Controller::redirectBack()
Controller::redirectedTo()
Controller::render()
Controller::setSession()
Controller::setURLParams()

Inherited From RequestHandlingData

RequestHandlingData::checkAccessAction()
RequestHandlingData::getRequest()
RequestHandlingData::handleRequest()
RequestHandlingData::httpError()

Inherited From ViewableData

ViewableData::ATT_val()
ViewableData::BaseHref()
ViewableData::buildCastingHelperCache()
ViewableData::cachedCall()
ViewableData::castingHelper()
ViewableData::castingHelperPair()
ViewableData::castingObjectCreator()
ViewableData::castingObjectCreatorPair()
ViewableData::CSSClasses()
ViewableData::CurrentMember()
ViewableData::CurrentPage()
ViewableData::customise()
ViewableData::Debug()
ViewableData::defineMethods()
ViewableData::escapeTypeForField()
ViewableData::Even()
ViewableData::EvenOdd()
ViewableData::First()
ViewableData::FirstLast()
ViewableData::getField()
ViewableData::getIterator()
ViewableData::getXMLValues()
ViewableData::hasField()
ViewableData::HasPerm()
ViewableData::hasValue()
ViewableData::i18nLocale()
ViewableData::IsAjax()
ViewableData::iteratorProperties()
ViewableData::JS_val()
ViewableData::Last()
ViewableData::Me()
ViewableData::Middle()
ViewableData::MiddleString()
ViewableData::obj()
ViewableData::Odd()
ViewableData::Pos()
ViewableData::RAW_val()
ViewableData::renderWith()
ViewableData::SecurityID()
ViewableData::setCustomisedObj()
ViewableData::setField()
ViewableData::SQL_val()
ViewableData::ThemeDir()
ViewableData::Top()
ViewableData::TotalItems()
ViewableData::val()
ViewableData::XML_val()
ViewableData::__get()
ViewableData::__isset()
ViewableData::__set()

Inherited From Object

Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:46:11 +1300 by phpDocumentor 1.3.2