A Soap Client datasource for CakePHP
Switch branches/tags
Nothing to show
Pull request Compare This branch is 11 commits behind Pagebakers:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README
soap_source.php

README

SoapSource

Copyright 2008 Pagebakers, www.pagebakers.nl

This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this library.  If not, see <http://www.gnu.org/licenses/>.

---------------------------------------------------------------------

Requirements :

PHP5 with Soap extension enabled
Cakephp 1.2

Usage :

Copy the soap_source.php file to your app/models/datasources/ directory

Add a configuration to your database.php in app/config/

var $soap = array(
    'datasource' => 'soap',
    'wsdl' => 'http://localhost/soapservice.wsdl', // wsdl mode
    'location' => '', // Required for non wsdl mode
    'uri' => '' // Required for non wsdl mode
);

Then in your model set:

var $useDbConfig = 'soap';

var $useTable = false;

And you're ready to go.

In your controller you can now use

$this->Model->query('SoapMethod', array('mySoapParams'));

or

$this->Model->SoapMethod(array('mySoapParams'));