2017 © Pedro Peláez
 

cakephp-plugin wsdl

SOAP made simple again with CakePHP. Build a classmap of the wsdl file.

image

ceeram/wsdl

SOAP made simple again with CakePHP. Build a classmap of the wsdl file.

  • Tuesday, November 20, 2012
  • by Ceeram
  • Repository
  • 3 Watchers
  • 21 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

This plugin iterates over a SOAP API and generates a (cake)php file that you can include in your projects that contains all the API's methods & objects as PHP classes. These classes can then be used by this plugin's datasource to talk with the service., (*1)

Prerequisites

You'll need the XSLTProcessor. On Ubuntu you'd install that as such:, (*2)

aptitude install php5-xsl

Install

cd app/Plugin
wget https://github.com/ceeram/wsdl/zipball/master -o wsdl.zip
unzip wsdl.zip
mv ceeram-wsdl-* Wsdl && rm -f wsdl.zip

or git clone, from your app dir:, (*3)

git clone git://github.com/ceeram/wsdl.git Plugin/Wsdl

Usage

In app/Config/bootstrap.php add:, (*4)

CakePlugin::load('Wsdl');

Command line:, (*5)

cake Wsdl.Wsdl

and follow the instructions, (*6)

create a config in database.php like the example:, (*7)

public $soapservice = array(
    'datasource' => 'Wsdl.WsdlSource',
    'wsdl' => 'http://domain.com/service.asmx?WSDL',
    'lib' => 'ServiceClassMap',
);

Set wsdl and lib to the values you entered and got back in the shell., (*8)

Add public $useTable = false; and public $useDbConfig = 'soapservice'; to your model., (*9)

Authentication

If the web service is protected via Basic authentication, you could supply the credentials as follows:, (*10)

public $soapservice = array(
    'datasource' => 'Wsdl.WsdlSource',
    'wsdl' => 'http://domain.com/service.asmx?WSDL',
    'lib' => 'ServiceClassMap',
    'login' => 'phally',
    'password' => 'awesome',
);

The Versions

20/11 2012

dev-master

9999999-dev http://github.com/ceeram/wsdl

SOAP made simple again with CakePHP. Build a classmap of the wsdl file.

  Sources   Download

MIT

The Requires