Skip to content

oh-sky/soapsource

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

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
    'proxy_host' => 'http://proxy.com', // optional
    'proxy_port' => 3128, // optional
    'curl_off' => true, // optional - turns curl wsdl fetch off
    'headers' => array( // optional - used with 3rd parameter in model
                    'ns' => 'namespace',
                    'container' => 'session_key',
    )
);

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'));

or with header data

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

About

A Soap Client datasource for CakePHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%