1 NuSOAP - Web Services Toolkit for PHP
3 Copyright (c) 2002 NuSphere Corporation
4 Copyright (c) 2003 Dietrich Ayala
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 If you have any questions or comments, please email or visit the website:
22 The development of this was once sponsored by NuSphere
23 http://www.nusphere.com
25 Information and updates are available at:
26 http://dietrich.ganx4.com/nusoap
28 For support, you can join the NuSOAP mailing list here:
29 https://lists.sourceforge.net/lists/listinfo/nusoap-general
35 NuSOAP is a set of PHP classes that allow users to send and receive
36 SOAP messages. Also included are utility classes for parsing WSDL
37 files and XML Schemas.
41 Enter this line at the top of your script:
43 include('/path/to/nusoap.php');
51 require_once('nusoap.php');
53 $s->register('hello');
54 function hello($name){
55 // optionally catch an error and return a fault
57 return new soap_fault('Client','','Must supply a valid name.');
59 return "hello $name!";
61 $s->service($HTTP_RAW_POST_DATA);
65 BASIC CLIENT USAGE EXAMPLE
69 require_once('nusoap.php');
70 $parameters = array('name'=>'dietrich');
71 $soapclient = new soapclient('http://someSOAPServer.com/hello.php');
72 echo $soapclient->call('hello',$parameters);
76 WSDL CLIENT USAGE EXAMPLE
80 require_once('nusoap.php');
81 $parameters = array('dietrich');
82 $soapclient = new soapclient('http://someSOAPServer.com/hello.wsdl','wsdl');
83 echo $soapclient->call('hello',$parameters);
87 PROXY CLIENT USAGE EXAMPLE (only works w/ wsdl)
91 require_once('nusoap.php');
92 $soapclient = new soapclient('http://someSOAPServer.com/hello.wsdl','wsdl');
93 $soap_proxy = $soapclient->getProxy();
94 echo $soap_proxy->hello('dietrich');