Skip to content
/ wsdl Public
forked from ceeram/wsdl

Soap made simple again, build a classmap off the wsdl and connect with the Wsdl datasource and CakePHP

Notifications You must be signed in to change notification settings

rchavik/wsdl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Prerequisites

You'll need the XSLTProcessor. On Ubuntu you'd install that as such:

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:

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

Usage

In app/Config/bootstrap.php add:

CakePlugin::load('Wsdl');

Command line:

cake Wsdl.Wsdl

and follow the instructions

create a config in database.php like the example:

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.

Add public $useTable = false; and public $useDbConfig = 'soapservice'; to your model.

Authentication

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

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

About

Soap made simple again, build a classmap off the wsdl and connect with the Wsdl datasource and CakePHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 62.2%
  • XSLT 37.8%