]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/nusoap/README.txt
Translate quotes
[SourceForge/phpwiki.git] / lib / nusoap / README.txt
1 NuSOAP - Web Services Toolkit for PHP
2
3 Copyright (c) 2002 NuSphere Corporation
4 Copyright (c) 2003 Dietrich Ayala
5
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.
10
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.
15
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
19
20 If you have any questions or comments, please email or visit the website:
21
22 The development of this was once sponsored by NuSphere
23 http://www.nusphere.com
24
25 Information and updates are available at:
26 http://dietrich.ganx4.com/nusoap
27
28 For support, you can join the NuSOAP mailing list here:
29 https://lists.sourceforge.net/lists/listinfo/nusoap-general
30
31 Version: 0.6.4
32
33 WHAT IS NuSOAP?
34
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.
38
39 INSTALLATION
40
41 Enter this line at the top of your script:
42
43 include('/path/to/nusoap.php');
44
45 USAGE EXAMPLES:
46
47 BASIC SERVER EXAMPLE
48
49 <?php
50
51 require_once('nusoap.php');
52 $s = new soap_server;
53 $s->register('hello');
54 function hello($name){
55         // optionally catch an error and return a fault
56         if($name == ''){
57         return new soap_fault('Client','','Must supply a valid name.');
58     }
59         return "hello $name!";
60 }
61 $s->service($HTTP_RAW_POST_DATA);
62
63 ?>
64
65 BASIC CLIENT USAGE EXAMPLE
66
67 <?php
68
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);
73
74 ?>
75
76 WSDL CLIENT USAGE EXAMPLE
77
78 <?php
79
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);
84
85 ?>
86
87 PROXY CLIENT USAGE EXAMPLE (only works w/ wsdl)
88
89 <?php
90
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');
95
96 ?>