Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Generic SOAP server for SilverStripe Framework

branch: master

Merge pull request #4 from wilr/master

Migrated route from core framework
latest commit 8c44635aa4
Ingo Schommer chillu authored January 30, 2014
Octocat-spinner-32 _config Add route July 14, 2013
Octocat-spinner-32 code
Octocat-spinner-32 tests MINOR Initial commit June 04, 2012
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md MINOR Initial commit June 04, 2012
Octocat-spinner-32 _config.php MINOR Initial commit June 04, 2012
README.md

SilverStripe RestfulServer Module

Overview

SOAP server class which auto-generates a WSDL file to initialize PHPs integrated SoapServer functionality. Extended by SOAPModelAccess to scaffold WSDL for a specific class.

This module is just a wrapper for the "restfulserver" module, internally all SOAP calls are rewritten as RESTful calls

Requirements

Configuration

Example DataObject with simple api access, giving full access to all object properties and relations, unless explicitly controlled through model permissions.

class Article extends DataObject {
    static $db = array('Title'=>'Text','Published'=>'Boolean');
    static $api_access = true;
}

Usage

Getting a record:

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

Updating a record:

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

Creating a record:

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

Creating a record:

$c = new SoapClient('http://mysite.com/soap/v1/wsdl');
echo $c->deleteXML("MyClassName");
Something went wrong with that request. Please try again.