summaryrefslogtreecommitdiff
path: root/ext/soap
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2010-01-07 13:31:53 +0100
committerOndřej Surý <ondrej@sury.org>2010-01-07 13:31:53 +0100
commit0fab6db7cac8d2be99579dd049f812a8ff98e74f (patch)
tree91f01b0d06916c78262404096bfd466b8e95e5b5 /ext/soap
parentd3a8757891280dc6650ca7eead67830c794b0e7b (diff)
downloadphp-upstream/5.3.1.tar.gz
Imported Upstream version 5.3.1upstream/5.3.1
Diffstat (limited to 'ext/soap')
-rw-r--r--ext/soap/TODO196
-rw-r--r--ext/soap/TODO.old78
-rw-r--r--ext/soap/config.m42
-rw-r--r--ext/soap/config.w322
-rw-r--r--ext/soap/interop/client_round2_interop.php2
-rw-r--r--ext/soap/interop/client_round2_params.php2
-rw-r--r--ext/soap/interop/client_round2_results.php2
-rw-r--r--ext/soap/interop/client_round2_run.php2
-rw-r--r--ext/soap/interop/server_round2_base.php2
-rw-r--r--ext/soap/interop/server_round2_groupB.php2
-rw-r--r--ext/soap/interop/server_round2_groupC.php2
-rw-r--r--ext/soap/php_encoding.c2
-rw-r--r--ext/soap/php_encoding.h2
-rw-r--r--ext/soap/php_http.c2
-rw-r--r--ext/soap/php_http.h2
-rw-r--r--ext/soap/php_packet_soap.c2
-rw-r--r--ext/soap/php_packet_soap.h2
-rw-r--r--ext/soap/php_schema.c5
-rw-r--r--ext/soap/php_schema.h2
-rw-r--r--ext/soap/php_sdl.c62
-rw-r--r--ext/soap/php_sdl.h7
-rw-r--r--ext/soap/php_soap.h2
-rw-r--r--ext/soap/php_xml.c2
-rw-r--r--ext/soap/php_xml.h2
-rw-r--r--ext/soap/readme.html1290
-rw-r--r--ext/soap/soap.c9
-rw-r--r--ext/soap/tests/bugs/bug47273.phpt53
-rw-r--r--ext/soap/tests/bugs/xml.xsd68
-rw-r--r--ext/soap/tests/schema/test_schema.inc154
-rw-r--r--ext/soap/tests/soap12/soap12-test.inc262
30 files changed, 1175 insertions, 1047 deletions
diff --git a/ext/soap/TODO b/ext/soap/TODO
index 800176cf0..ad0b11c94 100644
--- a/ext/soap/TODO
+++ b/ext/soap/TODO
@@ -1,98 +1,98 @@
-General
--------
-- make sure soapserver.map(), soap_encode_to_xml() and soap_encode_to_zval() are really need
-- reimplement SoapObject::__getfunctions() and SoapObject::__gettypes()
- to return structures instead of strings
-- error handling???
-
-SOAP
-----
-- SOAP routing
-- root attribute (it is defined by SOAP 1.1, but not SOAP 1.2)
-- make sure soap 1.1 and 1.2 are supported fully
-
-Encoding
---------
-? full support for standard simple types (
- ? language, (pattern: "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*")
- ? NMTOKEN, (pattern: "\c+") (\c: [a-zA-Z0-9.\-_:])
- ? NMTOKENS, (list: NMTOKEN, minLength: 1)
- ? Name, (pattern: "\i\c*") (\i: [a-zA-Z_:]
- ? NCName, (pattern: "[\i-[:]][\c-[:]]*")
- ? ID, (base: NCName)
- ? IDREF, (base: NCName)
- ? IDREFS, (list: IDREF; minLength: 1)
- ? ENTITY, (base: NCName)
- ? ENTITIES, (list: ENTITY; minLength: 1)
- ? duration)
-? full support for standard date/time types (
- ? dateTime,
- ? time,
- ? date,
- ? gYearMonth,
- ? gYear,
- ? gMonthDay,
- ? gDay,
- ? gMonth)
-? full support for arrays
- - SOAP 1.1 encoding of arrays with holes (partially transmitted and sparse arrays)
- SOAP 1.2 doesn't support partially transmitted and sparse arrays
-- references to external resources
-? support for "nillable" and "nil"
-? default values of <element>
-? provide schema 1999/2001 support???
-? make internal refrences for soap encoding (use seralization logic)???
-? provide user space overriding of serialization certin objects and types???
-
-WSDL
-----
-? server part support for "document" style encoding
-? support for <fault>, <soap:fault>
-? <soap:headerfault>
-- <soap:body> parts attribute (with MIME/DIME binding)
-- MIME binding
-- DIME binding
-- support for portType/operation parameterOrder attribute
-- support for binding operation input/output name attribute (part of overloading)
-- function/method overloading/redeclaration (test(int); test(string))
-- wsdl auto generation
-- HTTP GET/POST binding
-- SOAP security extension
-
-Schema
-------
-- <redefine>
-? support for user defined simple types
- ? restiction
- ? enumeration
- ? length (for string, anyURI, hexBinary, base64Binary and derived) list???
- ? minLength (for string, hexBinary, base64Binary and derived) list???
- ? maxLength (for string, hexBinary, base64Binary and derived) list???
- + whiteSpace (preserve, replace [#x9,#xA,#xD=>#x20], collapse [replace+?])
- - pattern
- - minExclusive (for numeric, date types)
- - minInclusive (for numeric, date types)
- - maxExclusive (for numeric, date types)
- - maxInclusive (for numeric, date types)
- - totalDigits (for decimal)
- - fractionDigits (for decimal)
- ? union
-? support for user defined complex types
- ? full support for content model encoding/decoding
- - <any>
- - <anyAttribute>
-
-Transport
----------
-? HTTP status codes
-? HTTP chunked Transfer-Encoding
-? support for HTTP compression (gzip,x-gzip,defalte)
-- transport abstraction layer???
-
-Interop Testing
----------------
-- more interop rounds/groups
-
-UDDI
-----
-- ???
+General
+-------
+- make sure soapserver.map(), soap_encode_to_xml() and soap_encode_to_zval() are really need
+- reimplement SoapObject::__getfunctions() and SoapObject::__gettypes()
+ to return structures instead of strings
+- error handling???
+
+SOAP
+----
+- SOAP routing
+- root attribute (it is defined by SOAP 1.1, but not SOAP 1.2)
+- make sure soap 1.1 and 1.2 are supported fully
+
+Encoding
+--------
+? full support for standard simple types (
+ ? language, (pattern: "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*")
+ ? NMTOKEN, (pattern: "\c+") (\c: [a-zA-Z0-9.\-_:])
+ ? NMTOKENS, (list: NMTOKEN, minLength: 1)
+ ? Name, (pattern: "\i\c*") (\i: [a-zA-Z_:]
+ ? NCName, (pattern: "[\i-[:]][\c-[:]]*")
+ ? ID, (base: NCName)
+ ? IDREF, (base: NCName)
+ ? IDREFS, (list: IDREF; minLength: 1)
+ ? ENTITY, (base: NCName)
+ ? ENTITIES, (list: ENTITY; minLength: 1)
+ ? duration)
+? full support for standard date/time types (
+ ? dateTime,
+ ? time,
+ ? date,
+ ? gYearMonth,
+ ? gYear,
+ ? gMonthDay,
+ ? gDay,
+ ? gMonth)
+? full support for arrays
+ - SOAP 1.1 encoding of arrays with holes (partially transmitted and sparse arrays)
+ SOAP 1.2 doesn't support partially transmitted and sparse arrays
+- references to external resources
+? support for "nillable" and "nil"
+? default values of <element>
+? provide schema 1999/2001 support???
+? make internal refrences for soap encoding (use seralization logic)???
+? provide user space overriding of serialization certin objects and types???
+
+WSDL
+----
+? server part support for "document" style encoding
+? support for <fault>, <soap:fault>
+? <soap:headerfault>
+- <soap:body> parts attribute (with MIME/DIME binding)
+- MIME binding
+- DIME binding
+- support for portType/operation parameterOrder attribute
+- support for binding operation input/output name attribute (part of overloading)
+- function/method overloading/redeclaration (test(int); test(string))
+- wsdl auto generation
+- HTTP GET/POST binding
+- SOAP security extension
+
+Schema
+------
+- <redefine>
+? support for user defined simple types
+ ? restiction
+ ? enumeration
+ ? length (for string, anyURI, hexBinary, base64Binary and derived) list???
+ ? minLength (for string, hexBinary, base64Binary and derived) list???
+ ? maxLength (for string, hexBinary, base64Binary and derived) list???
+ + whiteSpace (preserve, replace [#x9,#xA,#xD=>#x20], collapse [replace+?])
+ - pattern
+ - minExclusive (for numeric, date types)
+ - minInclusive (for numeric, date types)
+ - maxExclusive (for numeric, date types)
+ - maxInclusive (for numeric, date types)
+ - totalDigits (for decimal)
+ - fractionDigits (for decimal)
+ ? union
+? support for user defined complex types
+ ? full support for content model encoding/decoding
+ - <any>
+ - <anyAttribute>
+
+Transport
+---------
+? HTTP status codes
+? HTTP chunked Transfer-Encoding
+? support for HTTP compression (gzip,x-gzip,defalte)
+- transport abstraction layer???
+
+Interop Testing
+---------------
+- more interop rounds/groups
+
+UDDI
+----
+- ???
diff --git a/ext/soap/TODO.old b/ext/soap/TODO.old
index cb55a35ff..a1cc15c39 100644
--- a/ext/soap/TODO.old
+++ b/ext/soap/TODO.old
@@ -1,39 +1,39 @@
-TODO:
-make sure soap 1.1 and 1.2 is supported fully
-Better WSDL support Client and server (how much validation is needed here?)
-UDDI??
-make internal refrences for soap encoding (use seralization logic)
-add ini option for always soap_error_handler
-provide user space overriding of serialization certin objects and types
-serialization in general needs to be polished/finished... all xsd types
-make perstistant objects and work with or without register_globals on
-look to see if php-soap will work with out always_populate_raw_post_data on
-see if client will work with ssl.. should be eaiser with php_streams
-work on soap seralizer (php serialization)
--work on a soap-service 'regiestry' and 'proxy' (apache soap style)
--convert all string mainpulation to use smart_str
-make the 'soap' packet abstract.. maybe incorperate xml-rpc
-make the transport layer abstract.. what other transport layers are needed?... who uses smtp? what about jabber?
-make $soap_object->data = 'text'; maybe invoke a set_*() and/or get_*() method
-when using wsdls and function names are similar find the best match
- void test(int);
- void test(string);
- maybe use the same alogrithim as ext/java.
-investigate further http keep_alive... inital testing proved slower.. maybe php_streams will speed things up..
-provide schema 1999/2001 support....
-through memory leak testing
-possible using shared memory for sdl caching...
-api for clearing/checking sdl caching...
-make php-soap work as a standalone server using php_streams and the new socket extension
-http authication
-proxy support
-wsdl generation static and auto (.net style (http://server.com/soapserver.php?WSDL)) using phpdoc parsing engine
-interpo testing...
-BENCHMARKING...... lets prove how fast it is.
-do some more work on website
-
-does this list stop... what exactly have i done?
-im sure im forgetting 20 thousand more things....
-
-
- - brad
+TODO:
+make sure soap 1.1 and 1.2 is supported fully
+Better WSDL support Client and server (how much validation is needed here?)
+UDDI??
+make internal refrences for soap encoding (use seralization logic)
+add ini option for always soap_error_handler
+provide user space overriding of serialization certin objects and types
+serialization in general needs to be polished/finished... all xsd types
+make perstistant objects and work with or without register_globals on
+look to see if php-soap will work with out always_populate_raw_post_data on
+see if client will work with ssl.. should be eaiser with php_streams
+work on soap seralizer (php serialization)
+-work on a soap-service 'regiestry' and 'proxy' (apache soap style)
+-convert all string mainpulation to use smart_str
+make the 'soap' packet abstract.. maybe incorperate xml-rpc
+make the transport layer abstract.. what other transport layers are needed?... who uses smtp? what about jabber?
+make $soap_object->data = 'text'; maybe invoke a set_*() and/or get_*() method
+when using wsdls and function names are similar find the best match
+ void test(int);
+ void test(string);
+ maybe use the same alogrithim as ext/java.
+investigate further http keep_alive... inital testing proved slower.. maybe php_streams will speed things up..
+provide schema 1999/2001 support....
+through memory leak testing
+possible using shared memory for sdl caching...
+api for clearing/checking sdl caching...
+make php-soap work as a standalone server using php_streams and the new socket extension
+http authication
+proxy support
+wsdl generation static and auto (.net style (http://server.com/soapserver.php?WSDL)) using phpdoc parsing engine
+interpo testing...
+BENCHMARKING...... lets prove how fast it is.
+do some more work on website
+
+does this list stop... what exactly have i done?
+im sure im forgetting 20 thousand more things....
+
+
+ - brad
diff --git a/ext/soap/config.m4 b/ext/soap/config.m4
index 7a1b4a680..719e13c9c 100644
--- a/ext/soap/config.m4
+++ b/ext/soap/config.m4
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.10 2005/05/29 23:16:44 sniper Exp $
+dnl $Id: config.m4 242949 2007-09-26 15:44:16Z cvs2svn $
dnl config.m4 for extension soap
PHP_ARG_ENABLE(soap, whether to enable SOAP support,
diff --git a/ext/soap/config.w32 b/ext/soap/config.w32
index 809dcea9a..b4ea7d999 100644
--- a/ext/soap/config.w32
+++ b/ext/soap/config.w32
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.5.8.2 2009/04/22 19:06:47 pajoye Exp $
+// $Id: config.w32 279159 2009-04-22 19:06:47Z pajoye $
// vim:ft=javascript
ARG_ENABLE("soap", "SOAP support", "no");
diff --git a/ext/soap/interop/client_round2_interop.php b/ext/soap/interop/client_round2_interop.php
index 3caee080d..49439eaa3 100644
--- a/ext/soap/interop/client_round2_interop.php
+++ b/ext/soap/interop/client_round2_interop.php
@@ -16,7 +16,7 @@
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
// +----------------------------------------------------------------------+
//
-// $Id: client_round2_interop.php,v 1.17.2.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: client_round2_interop.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
require_once 'DB.php'; // PEAR/DB
require_once 'client_round2_params.php';
diff --git a/ext/soap/interop/client_round2_params.php b/ext/soap/interop/client_round2_params.php
index 25d299136..c83d92438 100644
--- a/ext/soap/interop/client_round2_params.php
+++ b/ext/soap/interop/client_round2_params.php
@@ -16,7 +16,7 @@
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
// +----------------------------------------------------------------------+
//
-// $Id: client_round2_params.php,v 1.11.4.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: client_round2_params.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
define('SOAP_TEST_ACTOR_OTHER','http://some/other/actor');
diff --git a/ext/soap/interop/client_round2_results.php b/ext/soap/interop/client_round2_results.php
index 5b5f1350b..52e3b5cd1 100644
--- a/ext/soap/interop/client_round2_results.php
+++ b/ext/soap/interop/client_round2_results.php
@@ -19,7 +19,7 @@
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
// +----------------------------------------------------------------------+
//
-// $Id: client_round2_results.php,v 1.4.4.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: client_round2_results.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
require_once 'client_round2_interop.php';
?>
diff --git a/ext/soap/interop/client_round2_run.php b/ext/soap/interop/client_round2_run.php
index 16699c25b..0c54ab0ad 100644
--- a/ext/soap/interop/client_round2_run.php
+++ b/ext/soap/interop/client_round2_run.php
@@ -15,7 +15,7 @@
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
// +----------------------------------------------------------------------+
//
-// $Id: client_round2_run.php,v 1.4.4.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: client_round2_run.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
set_time_limit(0);
diff --git a/ext/soap/interop/server_round2_base.php b/ext/soap/interop/server_round2_base.php
index c1f244266..1b4576405 100644
--- a/ext/soap/interop/server_round2_base.php
+++ b/ext/soap/interop/server_round2_base.php
@@ -17,7 +17,7 @@
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
// +----------------------------------------------------------------------+
//
-// $Id: server_round2_base.php,v 1.7.4.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: server_round2_base.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
class SOAP_Interop_Base {
diff --git a/ext/soap/interop/server_round2_groupB.php b/ext/soap/interop/server_round2_groupB.php
index 89ae819cb..788df6cb2 100644
--- a/ext/soap/interop/server_round2_groupB.php
+++ b/ext/soap/interop/server_round2_groupB.php
@@ -17,7 +17,7 @@
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
// +----------------------------------------------------------------------+
//
-// $Id: server_round2_groupB.php,v 1.7.4.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: server_round2_groupB.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
class SOAP_Interop_GroupB {
diff --git a/ext/soap/interop/server_round2_groupC.php b/ext/soap/interop/server_round2_groupC.php
index 065b6f33d..96e2f80da 100644
--- a/ext/soap/interop/server_round2_groupC.php
+++ b/ext/soap/interop/server_round2_groupC.php
@@ -16,7 +16,7 @@
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
// +----------------------------------------------------------------------+
//
-// $Id: server_round2_groupC.php,v 1.7.4.2 2006/01/01 13:27:13 sniper Exp $
+// $Id: server_round2_groupC.php 242949 2007-09-26 15:44:16Z cvs2svn $
//
class SOAP_Interop_GroupC {
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 3634ecaa1..9bf3356fd 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_encoding.c,v 1.103.2.21.2.37.2.14 2009/06/15 17:31:02 felipe Exp $ */
+/* $Id: php_encoding.c 282177 2009-06-15 17:31:02Z felipe $ */
#include <time.h>
diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h
index 2e12b2024..e144901f0 100644
--- a/ext/soap/php_encoding.h
+++ b/ext/soap/php_encoding.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_encoding.h,v 1.38.2.3.2.4.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_encoding.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_ENCODING_H
#define PHP_ENCODING_H
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index a142f7cbb..f1efbed44 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.77.2.11.2.12.2.11 2009/06/03 12:39:50 iliaa Exp $ */
+/* $Id: php_http.c 281589 2009-06-03 12:39:50Z iliaa $ */
#include "php_soap.h"
#include "ext/standard/base64.h"
diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h
index b5fa33f48..e3470a1ce 100644
--- a/ext/soap/php_http.h
+++ b/ext/soap/php_http.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.h,v 1.16.2.1.2.1.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_http.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_HTTP_H
#define PHP_HTTP_H
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c
index f96efca39..f93e76849 100644
--- a/ext/soap/php_packet_soap.c
+++ b/ext/soap/php_packet_soap.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_packet_soap.c,v 1.42.2.1.2.4.2.3 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_packet_soap.c 272370 2008-12-31 11:15:49Z sebastian $ */
#include "php_soap.h"
diff --git a/ext/soap/php_packet_soap.h b/ext/soap/php_packet_soap.h
index 1c56a8097..d9c00edb2 100644
--- a/ext/soap/php_packet_soap.h
+++ b/ext/soap/php_packet_soap.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_packet_soap.h,v 1.10.2.1.2.1.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_packet_soap.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_PACKET_SOAP_H
#define PHP_PACKET_SOAP_H
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 8a76418c0..c51bea4ee 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_schema.c,v 1.58.2.6.2.6.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_schema.c 287425 2009-08-17 18:23:48Z dmitry $ */
#include "php_soap.h"
#include "libxml/uri.h"
@@ -102,7 +102,10 @@ static void schema_load_file(sdlCtx *ctx, xmlAttrPtr ns, xmlChar *location, xmlA
xmlNodePtr schema;
xmlAttrPtr new_tns;
+ sdl_set_uri_credentials(ctx, (char*)location TSRMLS_CC);
doc = soap_xmlParseFile((char*)location TSRMLS_CC);
+ sdl_restore_uri_credentials(ctx TSRMLS_CC);
+
if (doc == NULL) {
soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s'", location);
}
diff --git a/ext/soap/php_schema.h b/ext/soap/php_schema.h
index 002c07efe..d7cc00aa2 100644
--- a/ext/soap/php_schema.h
+++ b/ext/soap/php_schema.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_schema.h,v 1.13.2.2.2.1.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_schema.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_SCHEMA_H
#define PHP_SCHEMA_H
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index a4b38e6c9..62161f9fe 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.c,v 1.88.2.12.2.9.2.6 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_sdl.c 287425 2009-08-17 18:23:48Z dmitry $ */
#include "php_soap.h"
#include "ext/libxml/php_libxml.h"
@@ -226,6 +226,64 @@ static int is_wsdl_element(xmlNodePtr node)
return 1;
}
+void sdl_set_uri_credentials(sdlCtx *ctx, char *uri TSRMLS_DC)
+{
+ char *s;
+ int l1, l2;
+ zval *context = NULL;
+ zval **header = NULL;
+
+ /* check if we load xsd from the same server */
+ s = strstr(ctx->sdl->source, "://");
+ if (!s) return;
+ s = strchr(s+3, '/');
+ l1 = s - ctx->sdl->source;
+ s = strstr((char*)uri, "://");
+ if (!s) return;
+ s = strchr(s+3, '/');
+ l2 = s - (char*)uri;
+ if (l1 != l2 || memcmp(ctx->sdl->source, uri, l1) != 0) {
+ /* another server. clear authentication credentals */
+ context = php_libxml_switch_context(NULL TSRMLS_CC);
+ php_libxml_switch_context(context TSRMLS_CC);
+ if (context) {
+ ctx->context = php_stream_context_from_zval(context, 1);
+
+ if (ctx->context &&
+ php_stream_context_get_option(ctx->context, "http", "header", &header) == SUCCESS) {
+ s = strstr(Z_STRVAL_PP(header), "Authorization: Basic");
+ if (s && (s == Z_STRVAL_PP(header) || *(s-1) == '\n' || *(s-1) == '\r')) {
+ char *rest = strstr(s, "\r\n");
+ if (rest) {
+ zval new_header;
+
+ rest += 2;
+ Z_TYPE(new_header) = IS_STRING;
+ Z_STRLEN(new_header) = Z_STRLEN_PP(header) - (rest - s);
+ Z_STRVAL(new_header) = emalloc(Z_STRLEN_PP(header) + 1);
+ memcpy(Z_STRVAL(new_header), Z_STRVAL_PP(header), s - Z_STRVAL_PP(header));
+ memcpy(Z_STRVAL(new_header) + (s - Z_STRVAL_PP(header)), rest, Z_STRLEN_PP(header) - (rest - Z_STRVAL_PP(header)) + 1);
+ ctx->old_header = *header;
+ Z_ADDREF_P(ctx->old_header);
+ php_stream_context_set_option(ctx->context, "http", "header", &new_header);
+ zval_dtor(&new_header);
+ }
+ }
+ }
+ }
+ }
+}
+
+void sdl_restore_uri_credentials(sdlCtx *ctx TSRMLS_DC)
+{
+ if (ctx->old_header) {
+ php_stream_context_set_option(ctx->context, "http", "header", ctx->old_header);
+ zval_ptr_dtor(&ctx->old_header);
+ ctx->old_header = NULL;
+ }
+ ctx->context = NULL;
+}
+
static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include TSRMLS_DC)
{
sdlPtr tmpsdl = ctx->sdl;
@@ -237,7 +295,9 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
return;
}
+ sdl_set_uri_credentials(ctx, struri TSRMLS_CC);
wsdl = soap_xmlParseFile(struri TSRMLS_CC);
+ sdl_restore_uri_credentials(ctx TSRMLS_CC);
if (!wsdl) {
xmlErrorPtr xmlErrorPtr = xmlGetLastError();
diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h
index 67f45159b..97612bf7c 100644
--- a/ext/soap/php_sdl.h
+++ b/ext/soap/php_sdl.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.h,v 1.37.2.3.2.2.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_sdl.h 287425 2009-08-17 18:23:48Z dmitry $ */
#ifndef PHP_SDL_H
#define PHP_SDL_H
@@ -76,6 +76,8 @@ typedef struct sdlCtx {
HashTable *attributes; /* array of sdlAttributePtr */
HashTable *attributeGroups; /* array of sdlTypesPtr */
+ php_stream_context *context;
+ zval *old_header;
} sdlCtx;
struct _sdlBinding {
@@ -264,4 +266,7 @@ sdlBindingPtr get_binding_from_name(sdlPtr sdl, char *name, char *ns);
void delete_sdl(void *handle);
void delete_sdl_impl(void *handle);
+void sdl_set_uri_credentials(sdlCtx *ctx, char *uri TSRMLS_DC);
+void sdl_restore_uri_credentials(sdlCtx *ctx TSRMLS_DC);
+
#endif
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index 23d0fefed..11ff51029 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_soap.h,v 1.38.2.6.2.6.2.4 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_soap.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_SOAP_H
#define PHP_SOAP_H
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 86fb9d3dc..92fa6cfef 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_xml.c,v 1.25.2.1.2.2.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_xml.c 272370 2008-12-31 11:15:49Z sebastian $ */
#include "php_soap.h"
#include "libxml/parser.h"
diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h
index 05ef2bda7..7d22ce715 100644
--- a/ext/soap/php_xml.h
+++ b/ext/soap/php_xml.h
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_xml.h,v 1.17.2.1.2.2.2.2 2008/12/31 11:15:43 sebastian Exp $ */
+/* $Id: php_xml.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_SOAP_XML_H
#define PHP_SOAP_XML_H
diff --git a/ext/soap/readme.html b/ext/soap/readme.html
index 366a0b2f5..98efff3c5 100644
--- a/ext/soap/readme.html
+++ b/ext/soap/readme.html
@@ -1,646 +1,646 @@
-<HTML>
-<HEAD>
-<TITLE>PHP SOAP Manual</TITLE>
-<STYLE>
-TR{
- vertical-align: "top";
-}
-TH{
- text-align: "left";
-}
-TD:{
- text-align: "left";
-}
-</STYLE>
-</HEAD>
-<BODY>
-<A name="ref.soap">
-<H1>PHP SOAP</H1>
-<H2>Introduction</H2>
-<TABLE BORDER="1">
-<TR><TD ALIGN="center"><B>Warning</B></TD></TR>
-<TR><TD ALIGN="left">This extension is <I>EXPERIMENTAL</I>. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.
-</TD></TR>
-</TABLE>
-<p>
-SOAP extension can be used to write SOAP Servers and Clients. It supports
-subsets of <a href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508" target="_top">SOAP 1.1</a>,
-<a href="http://www.w3.org/TR/" target="_top">SOAP 1.2</a> and
-<a href="http://www.w3.org/TR/wsdl" target="_top">WSDL 1.1</a> specifications.
-</p>
-<HR>
-<H2>Requirements</H2>
-This extension makes use of the <A HREF="http://www.xmlsoft.org" TARGET="_top">GNOME XML library</A>. Download and install this library. You will need at least libxml-2.5.4.
-<HR>
-<H2>Installation</H2>
-This extension is only available if PHP was configured with --enable-soap.
-<HR>
-<H2>Runtime Configuration</H2>
-<p>The behaviour of these functions is affected by settings in php.ini.</p>
-<TABLE BORDER="1">
-<TR><TH>Name</TH><TH>Default</TH><TH>Changeable</TH></TR>
-<TR><TD>soap.wsdl_cache_enabled</TD><TD>"1"</TD><TD>PHP_INI_ALL</TD></TR>
-<TR><TD>soap.wsdl_cache_dir</TD><TD>"/tmp"</TD><TD>PHP_INI_ALL</TD></TR>
-<TR><TD>soap.wsdl_cache_ttl</TD><TD>86400</TD><TD>PHP_INI_ALL</TD></TR>
-</TABLE>
-</p>Here is a short explanation of the configuration directives.</p>
-<dl>
-<dt><b>soap.wsdl_cache_enabled</b> (boolean)</dt>
-<dd>enables or disables WSDL caching feature.</dd>
-<dt><b>soap.wsdl_cache_dir</b> (string)</dt>
-<dd>sets the directory name where SOAP extension will put cache files</dd>
-<dt><b>soap.wsdl_cache_ttl</b> (integer)</dt>
-<dd>(time to live) sets the number of second while cached file will be used instead of original one.</dd>
-</dl>
-
-
-<HR>
-<H2>Predefined Constants</H2>
-The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
-<TABLE BORDER="1">
-<TR><TH>Constant</TH><TH>Value</TH><TH>Description</TH></TR>
-<TR><TH>SOAP_1_1 (integer)</TH><TD>1</TD><TD>SOAP version - SOAP 1.1. Can be used as an option in SoapClient and SoapServer constructors.</TD></TR>
-<TR><TH>SOAP_1_2 (integer)</TH><TD>2</TD><TD>SOAP version - SOAP 1.2. Can be used as an option in SoapClient and SoapServer constructors.</TD></TR>
-<TR><TH>SOAP_FUNCTIONS_ALL (integer)</TH><TD>999</TD><TD>Allows to export all defined functions with SoapClient::addFunction</TD></TR>
-<TR><TH>SOAP_PERSISTENCE_SESSION (integer)</TH><TD>1</TD><TD>Allows making class passed to SoapServer::setClass persistent for a PHP session.</TD></TR>
-<TR><TH>SOAP_PERSISTENCE_REQUEST (integer)</TH><TD>2</TD><TD>Allows making class passed to SoapServer::setClass non-persistent for a PHP session.</TD></TR>
-<TR><TH>SOAP_ENCODED (integer)</TH><TD>1</TD><TD>Can be passed as <b>style</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
-<TR><TH>SOAP_LITERAL (integer)</TH><TD>2</TD><TD>Can be passed as <b>style</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
-<TR><TH>SOAP_RPC (integer)</TH><TD>1</TD><TD>Can be passed as <b>use</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
-<TR><TH>SOAP_DOCUMENT (integer)</TH><TD>2</TD><TD>Can be passed as <b>use</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
-<TR><TH>SOAP_ACTOR_NEXT (integer)</TH><TD>1</TD><TD>Can be passed as <b>actor</b> to SoapHeader constructor.</TD></TR>
-<TR><TH>SOAP_ACTOR_NONE (integer)</TH><TD>2</TD><TD>Can be passed as <b>actor</b> to SoapHeader constructor</TD></TR>
-<TR><TH>SOAP_ACTOR_UNLIMATERECEIVER (integer)</TH><TD>3</TD><TD>Can be passed as <b>actor</b> to SoapHeader constructor</TD></TR>
-<TR><TH>UNKNOWN_TYPE (integer)</TH><TD>999998</TD><TD>Encoding for unknown type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_STRING (integer)</TH><TD>101</TD><TD>Encoding for standard XMLSchema <b>string</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_BOOLEAN (integer)</TH><TD>102</TD><TD>Encoding for standard XMLSchema <b>boolen</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_DECIMAL (integer)</TH><TD>103</TD><TD>Encoding for standard XMLSchema <b>decimal</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_FLOAT (integer)</TH><TD>104</TD><TD>Encoding for standard XMLSchema <b>float</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_DOUBLE (integer)</TH><TD>105</TD><TD>Encoding for standard XMLSchema <b>double</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_DURATION (integer)</TH><TD>106</TD><TD>Encoding for standard XMLSchema <b>duration</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_DATETIME (integer)</TH><TD>107</TD><TD>Encoding for standard XMLSchema <b>dateTime</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_TIME (integer)</TH><TD>108</TD><TD>Encoding for standard XMLSchema <b>time</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_DATE (integer)</TH><TD>109</TD><TD>Encoding for standard XMLSchema <b>data</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_GYEARMONTH (integer)</TH><TD>110</TD><TD>Encoding for standard XMLSchema <b>gYearMonth</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_GYEAR (integer)</TH><TD>111</TD><TD>Encoding for standard XMLSchema <b>gYear</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_GMONTHDAY (integer)</TH><TD>112</TD><TD>Encoding for standard XMLSchema <b>gMonthDay</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_GDAY (integer)</TH><TD>113</TD><TD>Encoding for standard XMLSchema <b>gDay</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_GMONTH (integer)</TH><TD>114</TD><TD>Encoding for standard XMLSchema <b>gMonth</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_HEXBINARY (integer)</TH><TD>115</TD><TD>Encoding for standard XMLSchema <b>hexBinary</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_BASE64BINARY (integer)</TH><TD>116</TD><TD>Encoding for standard XMLSchema <b>base64Binary</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_ANYURI (integer)</TH><TD>117</TD><TD>Encoding for standard XMLSchema <b>anyURI</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_QNAME (integer)</TH><TD>118</TD><TD>Encoding for standard XMLSchema <b>QName</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NOTATION (integer)</TH><TD>119</TD><TD>Encoding for standard XMLSchema <b>NOTATION</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NORMALIZEDSTRING (integer)</TH><TD>120</TD><TD>Encoding for standard XMLSchema <b>normalizedString</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_TOKEN (integer)</TH><TD>121</TD><TD>Encoding for standard XMLSchema <b>token</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_LANGUAGE (integer)</TH><TD>122</TD><TD>Encoding for standard XMLSchema <b>language</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NMTOKEN (integer)</TH><TD>123</TD><TD>Encoding for standard XMLSchema <b>NMTOKEN</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NAME (integer)</TH><TD>124</TD><TD>Encoding for standard XMLSchema <b>Name</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NCNAME (integer)</TH><TD>125</TD><TD>Encoding for standard XMLSchema <b>NCName</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_ID (integer)</TH><TD>126</TD><TD>Encoding for standard XMLSchema <b>ID</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_IDREF (integer)</TH><TD>127</TD><TD>Encoding for standard XMLSchema <b>IDREF</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_IDREFS (integer)</TH><TD>128</TD><TD>Encoding for standard XMLSchema <b>IDREFS</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_ENTITY (integer)</TH><TD>129</TD><TD>Encoding for standard XMLSchema <b>ENTITY</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_ENTITIES (integer)</TH><TD>130</TD><TD>Encoding for standard XMLSchema <b>ENTITIES</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_INTEGER (integer)</TH><TD>131</TD><TD>Encoding for standard XMLSchema <b>integer</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NONPOSITIVEINTEGER (integer)</TH><TD>132</TD><TD>Encoding for standard XMLSchema <b>nonPositiveInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NEGATIVEINTEGER (integer)</TH><TD>133</TD><TD>Encoding for standard XMLSchema <b>negativeInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_LONG (integer)</TH><TD>134</TD><TD>Encoding for standard XMLSchema <b>long</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_INT (integer)</TH><TD>135</TD><TD>Encoding for standard XMLSchema <b>int</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_SHORT (integer)</TH><TD>136</TD><TD>Encoding for standard XMLSchema <b>short</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_BYTE (integer)</TH><TD>137</TD><TD>Encoding for standard XMLSchema <b>byte</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NONNEGATIVEINTEGER (integer)</TH><TD>138</TD><TD>Encoding for standard XMLSchema <b>nonNegativeInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_UNSIGNEDLONG (integer)</TH><TD>139</TD><TD>Encoding for standard XMLSchema <b>unsignedLong</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_UNSIGNEDINT (integer)</TH><TD>140</TD><TD>Encoding for standard XMLSchema <b>unsignedInt</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_UNSIGNEDSHORT (integer)</TH><TD>141</TD><TD>Encoding for standard XMLSchema <b>unsignedShort</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_UNSIGNEDBYTE (integer)</TH><TD>142</TD><TD>Encoding for standard XMLSchema <b>unsignedByte</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_POSITIVEINTEGER (integer)</TH><TD>143</TD><TD>Encoding for standard XMLSchema <b>positiveInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NMTOKENS (integer)</TH><TD>144</TD><TD>Encoding for standard XMLSchema <b>NMTOKENS</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_ANYTYPE (integer)</TH><TD>145</TD><TD>Encoding for standard XMLSchema <b>anyType</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>SOAP_ENC_ARRAY (integer)</TH><TD>300</TD><TD>Encoding for SOAP <b>Array</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>SOAP_ENC_OBJECT (integer)</TH><TD>301</TD><TD>Encoding for SOAP <b>Struct</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_1999_TIMEINSTANT (integer)</TH><TD>401</TD><TD>Encoding for old XMLSchema <b>timeInstant</b> type. Can be passed to SoapVar constructor.</TD></TR>
-<TR><TH>XSD_NAMESPACE (string)</TH><TD>&nbsp;</TD><TD>The XML Schema namespace.</TD></TR>
-<TR><TH>XSD_1999_NAMESPACE (string)</TH><TD>&nbsp;</TD><TD>The old XML Schema namespace.</TD></TR>
-</TABLE>
-<HR>
-<H2>Classes</H2>
-<h4>List of classes</h4>
-<table border="0">
-<tr><td><a href="#ref.soap.soapclient">SoapClient</a></td></tr>
-<tr><td><a href="#ref.soap.soapserver">SoapServer</a></td></tr>
-<tr><td><a href="#ref.soap.soapparam">SoapParam</a></td></tr>
-<tr><td><a href="#ref.soap.soapvar">SoapVar</a></td></tr>
-<tr><td><a href="#ref.soap.soapheader">SoapHeader</a></td></tr>
-<tr><td><a href="#ref.soap.soapfault">SoapFault</a></td></tr>
-</table>
-<a name="ref.soap.soapclient">
-<h4>SoapClient class</h4>
-A SOAP client, that allows calling remote methods on SOAP WebService over HTTP
-or HTTPS.
-<table border="0">
-<tr><td><a href="#ref.soap.soapclient.soapclient">SoapClient</a> -- SoapClient constructor</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__call">__call</a> -- calls a SOAP function</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__getlastrequest">__getLastRequest</a> -- returns last SOAP request</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__getlastresponse">__getLastResponse</a> -- returns last SOAP response</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__getfunctions">__getFunctions</a> -- returns list of SOAP functions</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__gettypes">__getTypes</a> -- returns list of SOAP types</td></tr>
-</table>
-<a name="ref.soap.soapserver">
-<h4>SoapServer class</h4>
-This class can be used to build SOAP WebServices, which can be accessed from
-remote SOAP clients over HTTP or HTTPS.
-<table border="0">
-<tr><td><a href="#ref.soap.soapserver.soapserver">SoapServer</a> -- SoapServer constructor</td></tr>
-<tr><td><a href="#ref.soap.soapserver.addfunction">addFunction</a> -- adds one or several functions those will handle SOAP requests</td></tr>
-<tr><td><a href="#ref.soap.soapserver.setclass">setClass</a> -- sets class which will handle SOAP requests</td></tr>
-<tr><td><a href="#ref.soap.soapserver.getfunctions">getFunctions</a> -- returns list of defined functions</td></tr>
-<tr><td><a href="#ref.soap.soapserver.setpersistence">setPersistence</a> -- sets persistence mode of SoapServer</td></tr>
-<tr><td><a href="#ref.soap.soapserver.handle">handle</a> -- handles a SOAP request</td></tr>
-</table>
-<a name="ref.soap.soapparam">
-<h4>SoapParam class</h4>
-<p>
-SoapParam is a special low-level class for naming parameters and return values
-in nonWSDL mode. It is just a data holder and it has not any special method
-except constructor.
-</p>
-<table border="0">
-<tr><td><a href="#ref.soap.soapparam.soapparam">SoapParam</a> -- SoapParam constructor</td></tr>
-</table>
-<a name="ref.soap.soapvar">
-<h4>SoapVar classes</h4>
-<p>
-SoapVar is a special low-level class for encoding parameters and return values
-in nonWSDL mode. It is just a data holder and it has not any special method
-except constructor. It is useful when you like to set type property in SOAP
-request or response.
-</p>
-<table border="0">
-<tr><td><a href="#ref.soap.soapvar.soapvar">SoapVar</a> -- SoapVar constructor</td></tr>
-</table>
-<a name="ref.soap.soapheader">
-<h4>SoapHeader class</h4>
-<p>
-SoapHeader is a special low-level class for passing or returning SOAP headers.
-It is just a data holder and it has not any special method except constructor.
-</p>
-<table border="0">
-<tr><td><a href="#ref.soap.soapheader.soapheader">SoapHeader</a> -- SoapHeader constructor</td></tr>
-</table>
-<a name="ref.soap.soapfault">
-<h4>SoapFault class</h4>
-<p>
-SoapFault is a special class that can be used for error reporting during
-handling of SOAP request. It is derived form standard PHP Exception class,
-so it can be used to throw exceptions in server side and to catch tham on
-client side.
-</p>
-<table border="0">
-<tr><td><a href="#ref.soap.soapfault.soapfault">SoapFault</a> -- SoapFault constructor</td></tr>
-</table>
-<HR>
-<!--
-<H2>Examples</H2>
--->
-<h4>Table of Contents</h4>
-<table border="0">
-<tr><td><a href="#ref.soap.is_soap_fault">is_soap_fault</a> -- checks if SOAP call was failed</td></tr>
-<tr><td><a href="#ref.soap.soapclient.soapclient">SoapClient::SoapClient</a> -- SoapClient constructor</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__call">SoapClient::__call</a> -- calls a SOAP function</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__getlastrequest">SoapClient::__getLastRequest</a> -- returns last SOAP request</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__getlastresponse">SoapClient::__getLastResponse</a> -- returns last SOAP response</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__getfunctions">SoapClient::__getFunctions</a> -- returns list of SOAP functions</td></tr>
-<tr><td><a href="#ref.soap.soapclient.__gettypes">SoapClient::__getTypes</a> -- returns list of SOAP types</td></tr>
-<tr><td><a href="#ref.soap.soapserver.soapserver">SoapServer::SoapServer</a> -- SoapServer constructor</td></tr>
-<tr><td><a href="#ref.soap.soapserver.addfunction">SoapServer::addFunction</a> -- adds one or several functions those will handle SOAP requests</td></tr>
-<tr><td><a href="#ref.soap.soapserver.setclass">SoapServer::setClass</a> -- sets class which will handle SOAP requests</td></tr>
-<tr><td><a href="#ref.soap.soapserver.getfunctions">SoapServer::getFunctions</a> -- returns list of defined functions</td></tr>
-<tr><td><a href="#ref.soap.soapserver.setpersistence">SoapServer::setPersistence</a> -- sets persistence mode of SoapServer</td></tr>
-<tr><td><a href="#ref.soap.soapserver.handle">SoapServer::handle</a> -- handles a SOAP request</td></tr>
-<tr><td><a href="#ref.soap.soapparam.soapparam">SoapParam::SoapParam</a> -- SoapParam constructor</td></tr>
-<tr><td><a href="#ref.soap.soapvar.soapvar">SoapVar::SoapVar</a> -- SoapVar constructor</td></tr>
-<tr><td><a href="#ref.soap.soapheader.soapheader">SoapHeader::SoapHeader</a> -- SoapHeader constructor</td></tr>
-<tr><td><a href="#ref.soap.soapfault.soapfault">SoapFault::SoapFault</a> -- SoapFault constructor</td></tr>
-</table>
-
-<a name="ref.soap.is_soap_fault"></a>
-<h2>is_soap_fault</h2>
-<p>(PHP 5)</p>
-<p>checks if SOAP call was failed</p>
-<h3>Description</h3>
-<p>bool <b>is_soap_fault</b>(mixed obj)</p>
-<p>
-This function is useful when you like to check if the SOAP call was failed,
-but don't like to use exceptions. To use it you must create SoapClient object
-with <b>exceptions</b> option set to zero or false. In this case SOAP method
-will return a special SoapFault object which encapsulate the fault details
-(faultcode, faultstring, faultactor and faultdetails). If <b>exceptions</b> is
-not set then SOAP call will throw an exception on error.<br>
-is_soap_fault() functions checks if the given parameter is a SoapFault object.<br>
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = SoapClient("some.wsdl",array("exceptions"=>0));
- $result = $client->SomeFunction(...);
- if (is_soap_fault($result)) {
- trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faulstring})", E_ERROR);
- }
-?&gt;</PRE></TD></TR></TABLE>
-<p>Standard method that used by SOAP extension for error reporting is excptions.</p>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- try {
- $client = SoapClient("some.wsdl");
- $result = $client->SomeFunction(...);
- } catch (SoapFault $fault) {
- trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faulstring})", E_ERROR);
- }
-?&gt;</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapclient.soapclient"></a>
-<h2>SoapClient::SoapClient</h2>
-<p>(PHP 5)</p>
-<p>SoapClient constructor</p>
-<h3>Description</h3>
-<p><b>SoapClient</b>(mixed wsdl [, array options])</p>
-<p>
-The constructor allows creating SoapClient objects in WSDL or nonWSDL mode.
-The first case requires URI of WSDL file as first parameter and optional
-options array. The second case requires NULL as first parameter and options
-array with <b>location</b> and <b>uri</b> options set. Where <b>location</b> is
-a URL to request and <b>uri</b> is a target namespace of the SOAP service.
-<b>style</b> and <b>use</b> options has effect only on nonWSDL (in WSDL mode
-they comes from WSDL file). <b>soap_version</b> option allows to work as SOAP 1.1 or
-SOAP 1.2 client.
-Some additional optional options allow using HTTP authentication (<b>login</b>
-and <b>password</b>) and HTTP connection through proxy server (<b>proxy_host</b>,
-<b>proxy_port</b>, <b>proxy_login</b> and <b>proxy_password</b>).
-</p>
-<h4>Examples</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
- $client = new SoapClient("some.wsdl");
-
- $client = new SoapClient("some.wsdl",array('soap_version' => SOAP_1_2));
-
- $client = new SoapClient("some.wsdl",array('login' => "some_name",
- 'password' => "some_password"));
-
- $client = new SoapClient("some.wsdl",array('proxy_host' => "localhost",
- 'proxy_port' => 8080));
-
- $client = new SoapClient("some.wsdl",array('proxy_host' => "localhost",
- 'proxy_port' => 8080,
- 'proxy_login' => "some_name",
- 'proxy_password' => "some_password"));
-
- $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
- 'uri' => "http://test-uri/"));
-
- $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
- 'uri' => "http://test-uri/",
- 'style' => SOAP_DOCUMENT,
- 'use' => SOAP_LITERAL));
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapclient.__call"></a>
-<h2>SoapClient::__call</h2>
-<p>(PHP 5)</p>
-<p>calls a SOAP function</p>
-<h3>Description</h3>
-<p>mixed <b>__call</b>(string function_name, array arguments, [array options [, mixed input_headers [, mixed &output_headers]]])</p>
-<p>
-This is a low level API function to make a SOAP call. Usually in WSDL mode
-you can simple call SOAP functions as SoapClient methods. It is useful for
-nonWSDL mode when 'soapaction' is unknown, 'uri' is differ form default or
-when ypu like to send and/or receive SOAP Headers. To check if function call
-is failed check the result with is_soap_fault() function.<br>
-SOAP function may return one or several values. In the first case __call will
-return just the value of output parameter, in the second it will return
-array with named output parameters.
-</p>
-<h4>Examples</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
- $client = new SoapClient("some.wsdl");
- $client->SomeFunction($a,$b,$c);
- $client->__call("SomeFunction",array($a,$b,$c));
- $client->__call("SomeFunction",array($a,$b,$c), NULL,
- new SoapHeader(...), $output_headers);
-
-
- $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
- 'uri' => "http://test-uri/"));
- $client->SomeFunction($a,$b,$c);
- $client->__call("SomeFunction",array($a,$b,$c));
- $client->__call("SomeFunction",array($a,$b,$c),
- array('soapaction' => 'some_action',
- 'uri' => 'some_uri'));
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapclient.__getlastrequest"></a>
-<h2>SoapClient::__getLastRequest</h2>
-<p>(PHP 5)</p>
-<p>returns last SOAP request</p>
-<h3>Description</h3>
-<p>string <b>__getLastRequest</b>()</p>
-<p>
-This function works only with SoapClient which was created with trace option.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = SoapClient("some.wsdl", array('trace'=>1));
- $result = $client->SomeFunction(...);
- echo "REQUEST:\n".$client->__getLastRequest()."\n";
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapclient.__getlastresponse"></a>
-<h2>SoapClient::__getLastResponse</h2>
-<p>(PHP 5)</p>
-<p>returns last SOAP response</p>
-<h3>Description</h3>
-<p>string <b>__getLastResponse</b>()</p>
-<p>
-This function works only with SoapClient which was created with trace option.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = SoapClient("some.wsdl", array('trace'=>1));
- $result = $client->SomeFunction(...);
- echo "RESPONSE:\n".$client->__getLastResponse()."\n";
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapclient.__getfunctions"></a>
-<h2>SoapClient::__getFunctions</h2>
-<p>(PHP 5)</p>
-<p>returns list of SOAP functions</p>
-<h3>Description</h3>
-<p>array <b>__getFunctions</b>()</p>
-<p>
-This function works only in WSDL mode.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = SoapClient("some.wsdl");
- var_dump($client->__getFunctions());
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapclient.__gettypes"></a>
-<h2>SoapClient::__getTypes</h2>
-<p>(PHP 5)</p>
-<p>returns list of SOAP types</p>
-<h3>Description</h3>
-<p>array <b>__getTypes</b>()</p>
-<p>
-This function works only in WSDL mode.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = SoapClient("some.wsdl");
- var_dump($client->__getTypes());
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapserver.soapserver"></a>
-<h2>SoapServer::SoapServer</h2>
-<p>(PHP 5)</p>
-<p>SoapServer constructor</p>
-<h3>Description</h3>
-<p><b>SoapServer</b>(mixed wsdl [, array options])</p>
-It allows creating SoapServer objects in WSDL or nonWSDL mode. In the first
-case <b>wsdl</b> must be set to URI of WSDL file. In the second <b>wsdl</b>
-must be set to null and <b>uti</b> option must be set. Additional options
-allow setting a default SOAP version (<b>soap_version</b>) and actor URI
-(<b>actor</b>).
-
-<h4>Examples</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
- $server = new SoapServer("some.wsdl");
-
- $server = new SoapServer("some.wsdl",array('soap_version'=>SOAP_1_2));
-
- $server = new SoapServer("some.wsdl",array('actor'=>"http://example.org/ts-tests/C"));
-
- $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapserver.addfunction">
-<h2>SoapServer::addFunction</h2>
-<p>(PHP 5)</p>
-<p>adds one or several functions those will handle SOAP requests</p>
-<h3>Description</h3>
-<p>void <b>addFunction</b>(mixed functions)</p>
-Exports one or more functions for remote clients. To export one function pass
-function name into <b>functions</b> parameter as string. To export several
-functions pass an array of function names and to export all functions pass
-a special constant <b>SOAP_FUNCTIONS_ALL</b>.<br>
-Functions must receive all input arguments in the same order as defined
-in WSDL file (They should not receive any output parameters as arguments) and
-return one or more values. To return several values they must return array with
-named output parameters.
-<h4>Examples</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
- function func($inputString) {
- return $inputString;
- }
- $server->addFunction("echoString");
-
- function echoTwoStrings($inputString1, $inputString2) {
- return array("outputString1"=>$inputString1,"outputString2"=>$inputString2);
- }
- $server->addFunction(array("echoString","echoTwoStrings"));
-
- $server->addFunction(SOAP_FUNCTIONS_ALL);
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapserver.setclass"></a>
-<h2>SoapServer::setClass</h2>
-<p>(PHP 5)</p>
-<p>sets class which will handle SOAP requests</p>
-<h3>Description</h3>
-<p>void <b>setClass</b>(string class_name [, ...])</p>
-Exports all methods from specified class. Additional parameters will be passed
-to default class constructor during object creation. The object can be maiden
-persistent across request for a given PHP session with
-<a href="#ref.soap.soapserver.setpersistence">SoapServer::setPersistence</a> method.
-<h4>Examples</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
- $server->setClass("foo");
-
- $server->setClass("foo", $arg1, $arg2);
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapserver.getfunctions">
-<h2>SoapServer::getFunctions</h2>
-<p>(PHP 5)</p>
-<p>returns list of defined functions</p>
-<h3>Description</h3>
-<p>array <b>getFunctions</b>()</p>
-
-<a name="ref.soap.soapserver.setpersistence"></a>
-<h2>SoapServer::setPersistence</h2>
-<p>(PHP 5)</p>
-<p>sets persistence mode of SoapServer</p>
-<h3>Description</h3>
-<p>void <b>setPersistence</b>(int mode)</p>
-This function allows saving data between requests in PHP session. It works only
-with server that exports functions form class (see
-<a href="#ref.soap.soapserver.setclass">SoapServer:setCalss</a>).
-<h4>Examples</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
- $server->setpersistence(SOAP_PERSISTENCE_SESSION);
-
- $server->setpersistence(SOAP_PERSISTENCE_REQUEST);
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapserver.handle"></a>
-<h2>SoapServer::handle</h2>
-<p>(PHP 5)</p>
-<p>handles a SOAP request</p>
-<h3>Description</h3>
-<p>void <b>handle</b>([string soap_envelope])</p>
-It processes a SOAP request, call necessary functions, and send response back.
-It assumes request in input parameter or in global <b>$HTTP_RAW_POST_DATA</b> PHP variable
-if the argument is omitted.
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- function test($x) {
- return $x;
- }
-
- $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
- $server->addFunction("test");
- $server->handle();
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapparam.soapparam"></a>
-<h2>SoapParam::SoapParam</h2>
-<p>(PHP 5)</p>
-<p>SoapParam constructor</p>
-<h3>Description</h3>
-<p><b>SoapParam</b>(mixed data, string name)</p>
-<p>
-SoapParam is a special low-level class for naming parameters and return values
-in nonWSDL mode. It is just a data holder and it has not any special method
-except constructor. The constructor takes <b>data</b> to pass or return and
-<b>name</b>. It is possible to pass parameter directly as PHP value, but in
-this case it will be named as <b><i>paramN</i></b> and SOAP Service may not
-understand it.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
- 'uri' => "http://test-uri/"));
- $client->SomeFunction(new SoapParam($a,"a"),
- new SoapParam($b,"b"),
- new SoapParam($c,"c"));
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapvar.soapvar"></a>
-<h2>SoapVar::SoapVar</h2>
-<p>(PHP 5)</p>
-<p>SoapVar constructor</p>
-<h3>Description</h3>
-<p><b>SoapVar</b>(mixed data, int encoding [, string type [, string type_ns [, string name [, string name_ns]]]])</p>
-<p>
-SoapVar is a special low-level class for encoding parameters and return values
-in nonWSDL mode. It is just a data holder and it has not any special method
-except constructor. It is useful when you like to set type property in SOAP
-request or response. The constructor takes <b>data</b> to pass or return,
-<b>encoding</b> ID to encode it (see <b><i>XSD_...</i></b> constants) and as
-option type name and namespace and value name and namespace.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- class SOAPStruct {
- function SOAPStruct($s, $i, $f) {
- $this->varString = $s;
- $this->varInt = $i;
- $this->varFloat = $f;
- }
- }
- $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
- 'uri' => "http://test-uri/"));
- $struct = new SOAPStruct('arg',34,325.325);
- $soapstruct = new SoapVar($struct,SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd");
- $client->echoStruct(new SoapParam($soapstruct, "inputStruct"));
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapheader.soapheader"></a>
-<h2>SoapHeader::SoapHeader</h2>
-<p>(PHP 5)</p>
-<p>SoapHeader constructor</p>
-<h3>Description</h3>
-<p><b>SoapHeader</b>(string name_ns, string name [, mixed data [, bool must_understand [, mixed actor]]])</p>
-<p>
-SoapHeader is a special low-level class for passing or returning SOAP headers.
-It is just a data holder and it has not any special method except constructor.
-It can be used in <a href="#ref.soap.soapclient.__call">SoapClient::__call</a>
-method to pass SOAP header or in SOAP header handler to return header in SOAP
-response. <b>name_ns</b> and <b>name</b> are namespace and name of the SOAP
-header element. <b>data</b> is a SOAP header's content. It can be a PHP value
-or SoapVar object. <b>must_understand</b> and <b>actor</b> are values for
-<b><i>mustUnderstand</i></b> and <b><i>actor</i></b> attributes of this SOAP
-Header element.
-</p>
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
- 'uri' => "http://test-uri/"));
- $client->__call("echoVoid",NULL,NULL,
- new SoapHeader('http://soapinterop.org/echoheader/',
- 'echoMeStringRequest',
- 'hello world'));
-?&gt;
-</PRE></TD></TR></TABLE>
-
-<a name="ref.soap.soapfault.soapfault"></a>
-<h2>SoapFault::SoapFault</h2>
-<p>(PHP 5)</p>
-<p>SoapFault constructor</p>
-<h3>Description</h3>
-<p><b>SoapFault</b>(string faultcode, string faultstring [, string faultactor [, mixed details [, string faultname [, mixed headerfault]]]])</p>
-This class is useful when you like to send SOAP fault response from PHP handler.<br>
-<b>faultcode</b>, <b>faultstring</b>, <b>faultactor</b> and <b>details</b> are standard elements of SOAP Fault;<br>
-<b>faultname</b> is an optional parameter that can be used to select proper fault encoding from WSDL.<br>
-<b>headerfault</b> is an optional parameter that can be used during SOAP header handling to report error in response header.
-<h4>Example</h4>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- function test($x) {
- return new SoapFault("Server","Some error message");
- }
-
- $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
- $server->addFunction("test");
- $server->handle();
-?&gt;
-</PRE></TD></TR></TABLE>
-<p>It is possible to use PHP exception mechanism to throw SOAP Fault.</p>
-<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
-&lt;?php
- function test($x) {
- throw new SoapFault("Server","Some error message");
- }
-
- $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
- $server->addFunction("test");
- $server->handle();
-?&gt;
-</PRE></TD></TR></TABLE>
-</BODY>
+<HTML>
+<HEAD>
+<TITLE>PHP SOAP Manual</TITLE>
+<STYLE>
+TR{
+ vertical-align: "top";
+}
+TH{
+ text-align: "left";
+}
+TD:{
+ text-align: "left";
+}
+</STYLE>
+</HEAD>
+<BODY>
+<A name="ref.soap">
+<H1>PHP SOAP</H1>
+<H2>Introduction</H2>
+<TABLE BORDER="1">
+<TR><TD ALIGN="center"><B>Warning</B></TD></TR>
+<TR><TD ALIGN="left">This extension is <I>EXPERIMENTAL</I>. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.
+</TD></TR>
+</TABLE>
+<p>
+SOAP extension can be used to write SOAP Servers and Clients. It supports
+subsets of <a href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508" target="_top">SOAP 1.1</a>,
+<a href="http://www.w3.org/TR/" target="_top">SOAP 1.2</a> and
+<a href="http://www.w3.org/TR/wsdl" target="_top">WSDL 1.1</a> specifications.
+</p>
+<HR>
+<H2>Requirements</H2>
+This extension makes use of the <A HREF="http://www.xmlsoft.org" TARGET="_top">GNOME XML library</A>. Download and install this library. You will need at least libxml-2.5.4.
+<HR>
+<H2>Installation</H2>
+This extension is only available if PHP was configured with --enable-soap.
+<HR>
+<H2>Runtime Configuration</H2>
+<p>The behaviour of these functions is affected by settings in php.ini.</p>
+<TABLE BORDER="1">
+<TR><TH>Name</TH><TH>Default</TH><TH>Changeable</TH></TR>
+<TR><TD>soap.wsdl_cache_enabled</TD><TD>"1"</TD><TD>PHP_INI_ALL</TD></TR>
+<TR><TD>soap.wsdl_cache_dir</TD><TD>"/tmp"</TD><TD>PHP_INI_ALL</TD></TR>
+<TR><TD>soap.wsdl_cache_ttl</TD><TD>86400</TD><TD>PHP_INI_ALL</TD></TR>
+</TABLE>
+</p>Here is a short explanation of the configuration directives.</p>
+<dl>
+<dt><b>soap.wsdl_cache_enabled</b> (boolean)</dt>
+<dd>enables or disables WSDL caching feature.</dd>
+<dt><b>soap.wsdl_cache_dir</b> (string)</dt>
+<dd>sets the directory name where SOAP extension will put cache files</dd>
+<dt><b>soap.wsdl_cache_ttl</b> (integer)</dt>
+<dd>(time to live) sets the number of second while cached file will be used instead of original one.</dd>
+</dl>
+
+
+<HR>
+<H2>Predefined Constants</H2>
+The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
+<TABLE BORDER="1">
+<TR><TH>Constant</TH><TH>Value</TH><TH>Description</TH></TR>
+<TR><TH>SOAP_1_1 (integer)</TH><TD>1</TD><TD>SOAP version - SOAP 1.1. Can be used as an option in SoapClient and SoapServer constructors.</TD></TR>
+<TR><TH>SOAP_1_2 (integer)</TH><TD>2</TD><TD>SOAP version - SOAP 1.2. Can be used as an option in SoapClient and SoapServer constructors.</TD></TR>
+<TR><TH>SOAP_FUNCTIONS_ALL (integer)</TH><TD>999</TD><TD>Allows to export all defined functions with SoapClient::addFunction</TD></TR>
+<TR><TH>SOAP_PERSISTENCE_SESSION (integer)</TH><TD>1</TD><TD>Allows making class passed to SoapServer::setClass persistent for a PHP session.</TD></TR>
+<TR><TH>SOAP_PERSISTENCE_REQUEST (integer)</TH><TD>2</TD><TD>Allows making class passed to SoapServer::setClass non-persistent for a PHP session.</TD></TR>
+<TR><TH>SOAP_ENCODED (integer)</TH><TD>1</TD><TD>Can be passed as <b>style</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
+<TR><TH>SOAP_LITERAL (integer)</TH><TD>2</TD><TD>Can be passed as <b>style</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
+<TR><TH>SOAP_RPC (integer)</TH><TD>1</TD><TD>Can be passed as <b>use</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
+<TR><TH>SOAP_DOCUMENT (integer)</TH><TD>2</TD><TD>Can be passed as <b>use</b> option to SoapClient constructor in nonWSDL mode.</TD></TR>
+<TR><TH>SOAP_ACTOR_NEXT (integer)</TH><TD>1</TD><TD>Can be passed as <b>actor</b> to SoapHeader constructor.</TD></TR>
+<TR><TH>SOAP_ACTOR_NONE (integer)</TH><TD>2</TD><TD>Can be passed as <b>actor</b> to SoapHeader constructor</TD></TR>
+<TR><TH>SOAP_ACTOR_UNLIMATERECEIVER (integer)</TH><TD>3</TD><TD>Can be passed as <b>actor</b> to SoapHeader constructor</TD></TR>
+<TR><TH>UNKNOWN_TYPE (integer)</TH><TD>999998</TD><TD>Encoding for unknown type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_STRING (integer)</TH><TD>101</TD><TD>Encoding for standard XMLSchema <b>string</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_BOOLEAN (integer)</TH><TD>102</TD><TD>Encoding for standard XMLSchema <b>boolen</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_DECIMAL (integer)</TH><TD>103</TD><TD>Encoding for standard XMLSchema <b>decimal</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_FLOAT (integer)</TH><TD>104</TD><TD>Encoding for standard XMLSchema <b>float</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_DOUBLE (integer)</TH><TD>105</TD><TD>Encoding for standard XMLSchema <b>double</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_DURATION (integer)</TH><TD>106</TD><TD>Encoding for standard XMLSchema <b>duration</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_DATETIME (integer)</TH><TD>107</TD><TD>Encoding for standard XMLSchema <b>dateTime</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_TIME (integer)</TH><TD>108</TD><TD>Encoding for standard XMLSchema <b>time</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_DATE (integer)</TH><TD>109</TD><TD>Encoding for standard XMLSchema <b>data</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_GYEARMONTH (integer)</TH><TD>110</TD><TD>Encoding for standard XMLSchema <b>gYearMonth</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_GYEAR (integer)</TH><TD>111</TD><TD>Encoding for standard XMLSchema <b>gYear</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_GMONTHDAY (integer)</TH><TD>112</TD><TD>Encoding for standard XMLSchema <b>gMonthDay</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_GDAY (integer)</TH><TD>113</TD><TD>Encoding for standard XMLSchema <b>gDay</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_GMONTH (integer)</TH><TD>114</TD><TD>Encoding for standard XMLSchema <b>gMonth</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_HEXBINARY (integer)</TH><TD>115</TD><TD>Encoding for standard XMLSchema <b>hexBinary</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_BASE64BINARY (integer)</TH><TD>116</TD><TD>Encoding for standard XMLSchema <b>base64Binary</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_ANYURI (integer)</TH><TD>117</TD><TD>Encoding for standard XMLSchema <b>anyURI</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_QNAME (integer)</TH><TD>118</TD><TD>Encoding for standard XMLSchema <b>QName</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NOTATION (integer)</TH><TD>119</TD><TD>Encoding for standard XMLSchema <b>NOTATION</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NORMALIZEDSTRING (integer)</TH><TD>120</TD><TD>Encoding for standard XMLSchema <b>normalizedString</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_TOKEN (integer)</TH><TD>121</TD><TD>Encoding for standard XMLSchema <b>token</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_LANGUAGE (integer)</TH><TD>122</TD><TD>Encoding for standard XMLSchema <b>language</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NMTOKEN (integer)</TH><TD>123</TD><TD>Encoding for standard XMLSchema <b>NMTOKEN</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NAME (integer)</TH><TD>124</TD><TD>Encoding for standard XMLSchema <b>Name</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NCNAME (integer)</TH><TD>125</TD><TD>Encoding for standard XMLSchema <b>NCName</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_ID (integer)</TH><TD>126</TD><TD>Encoding for standard XMLSchema <b>ID</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_IDREF (integer)</TH><TD>127</TD><TD>Encoding for standard XMLSchema <b>IDREF</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_IDREFS (integer)</TH><TD>128</TD><TD>Encoding for standard XMLSchema <b>IDREFS</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_ENTITY (integer)</TH><TD>129</TD><TD>Encoding for standard XMLSchema <b>ENTITY</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_ENTITIES (integer)</TH><TD>130</TD><TD>Encoding for standard XMLSchema <b>ENTITIES</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_INTEGER (integer)</TH><TD>131</TD><TD>Encoding for standard XMLSchema <b>integer</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NONPOSITIVEINTEGER (integer)</TH><TD>132</TD><TD>Encoding for standard XMLSchema <b>nonPositiveInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NEGATIVEINTEGER (integer)</TH><TD>133</TD><TD>Encoding for standard XMLSchema <b>negativeInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_LONG (integer)</TH><TD>134</TD><TD>Encoding for standard XMLSchema <b>long</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_INT (integer)</TH><TD>135</TD><TD>Encoding for standard XMLSchema <b>int</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_SHORT (integer)</TH><TD>136</TD><TD>Encoding for standard XMLSchema <b>short</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_BYTE (integer)</TH><TD>137</TD><TD>Encoding for standard XMLSchema <b>byte</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NONNEGATIVEINTEGER (integer)</TH><TD>138</TD><TD>Encoding for standard XMLSchema <b>nonNegativeInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_UNSIGNEDLONG (integer)</TH><TD>139</TD><TD>Encoding for standard XMLSchema <b>unsignedLong</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_UNSIGNEDINT (integer)</TH><TD>140</TD><TD>Encoding for standard XMLSchema <b>unsignedInt</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_UNSIGNEDSHORT (integer)</TH><TD>141</TD><TD>Encoding for standard XMLSchema <b>unsignedShort</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_UNSIGNEDBYTE (integer)</TH><TD>142</TD><TD>Encoding for standard XMLSchema <b>unsignedByte</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_POSITIVEINTEGER (integer)</TH><TD>143</TD><TD>Encoding for standard XMLSchema <b>positiveInteger</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NMTOKENS (integer)</TH><TD>144</TD><TD>Encoding for standard XMLSchema <b>NMTOKENS</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_ANYTYPE (integer)</TH><TD>145</TD><TD>Encoding for standard XMLSchema <b>anyType</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>SOAP_ENC_ARRAY (integer)</TH><TD>300</TD><TD>Encoding for SOAP <b>Array</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>SOAP_ENC_OBJECT (integer)</TH><TD>301</TD><TD>Encoding for SOAP <b>Struct</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_1999_TIMEINSTANT (integer)</TH><TD>401</TD><TD>Encoding for old XMLSchema <b>timeInstant</b> type. Can be passed to SoapVar constructor.</TD></TR>
+<TR><TH>XSD_NAMESPACE (string)</TH><TD>&nbsp;</TD><TD>The XML Schema namespace.</TD></TR>
+<TR><TH>XSD_1999_NAMESPACE (string)</TH><TD>&nbsp;</TD><TD>The old XML Schema namespace.</TD></TR>
+</TABLE>
+<HR>
+<H2>Classes</H2>
+<h4>List of classes</h4>
+<table border="0">
+<tr><td><a href="#ref.soap.soapclient">SoapClient</a></td></tr>
+<tr><td><a href="#ref.soap.soapserver">SoapServer</a></td></tr>
+<tr><td><a href="#ref.soap.soapparam">SoapParam</a></td></tr>
+<tr><td><a href="#ref.soap.soapvar">SoapVar</a></td></tr>
+<tr><td><a href="#ref.soap.soapheader">SoapHeader</a></td></tr>
+<tr><td><a href="#ref.soap.soapfault">SoapFault</a></td></tr>
+</table>
+<a name="ref.soap.soapclient">
+<h4>SoapClient class</h4>
+A SOAP client, that allows calling remote methods on SOAP WebService over HTTP
+or HTTPS.
+<table border="0">
+<tr><td><a href="#ref.soap.soapclient.soapclient">SoapClient</a> -- SoapClient constructor</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__call">__call</a> -- calls a SOAP function</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__getlastrequest">__getLastRequest</a> -- returns last SOAP request</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__getlastresponse">__getLastResponse</a> -- returns last SOAP response</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__getfunctions">__getFunctions</a> -- returns list of SOAP functions</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__gettypes">__getTypes</a> -- returns list of SOAP types</td></tr>
+</table>
+<a name="ref.soap.soapserver">
+<h4>SoapServer class</h4>
+This class can be used to build SOAP WebServices, which can be accessed from
+remote SOAP clients over HTTP or HTTPS.
+<table border="0">
+<tr><td><a href="#ref.soap.soapserver.soapserver">SoapServer</a> -- SoapServer constructor</td></tr>
+<tr><td><a href="#ref.soap.soapserver.addfunction">addFunction</a> -- adds one or several functions those will handle SOAP requests</td></tr>
+<tr><td><a href="#ref.soap.soapserver.setclass">setClass</a> -- sets class which will handle SOAP requests</td></tr>
+<tr><td><a href="#ref.soap.soapserver.getfunctions">getFunctions</a> -- returns list of defined functions</td></tr>
+<tr><td><a href="#ref.soap.soapserver.setpersistence">setPersistence</a> -- sets persistence mode of SoapServer</td></tr>
+<tr><td><a href="#ref.soap.soapserver.handle">handle</a> -- handles a SOAP request</td></tr>
+</table>
+<a name="ref.soap.soapparam">
+<h4>SoapParam class</h4>
+<p>
+SoapParam is a special low-level class for naming parameters and return values
+in nonWSDL mode. It is just a data holder and it has not any special method
+except constructor.
+</p>
+<table border="0">
+<tr><td><a href="#ref.soap.soapparam.soapparam">SoapParam</a> -- SoapParam constructor</td></tr>
+</table>
+<a name="ref.soap.soapvar">
+<h4>SoapVar classes</h4>
+<p>
+SoapVar is a special low-level class for encoding parameters and return values
+in nonWSDL mode. It is just a data holder and it has not any special method
+except constructor. It is useful when you like to set type property in SOAP
+request or response.
+</p>
+<table border="0">
+<tr><td><a href="#ref.soap.soapvar.soapvar">SoapVar</a> -- SoapVar constructor</td></tr>
+</table>
+<a name="ref.soap.soapheader">
+<h4>SoapHeader class</h4>
+<p>
+SoapHeader is a special low-level class for passing or returning SOAP headers.
+It is just a data holder and it has not any special method except constructor.
+</p>
+<table border="0">
+<tr><td><a href="#ref.soap.soapheader.soapheader">SoapHeader</a> -- SoapHeader constructor</td></tr>
+</table>
+<a name="ref.soap.soapfault">
+<h4>SoapFault class</h4>
+<p>
+SoapFault is a special class that can be used for error reporting during
+handling of SOAP request. It is derived form standard PHP Exception class,
+so it can be used to throw exceptions in server side and to catch tham on
+client side.
+</p>
+<table border="0">
+<tr><td><a href="#ref.soap.soapfault.soapfault">SoapFault</a> -- SoapFault constructor</td></tr>
+</table>
+<HR>
+<!--
+<H2>Examples</H2>
+-->
+<h4>Table of Contents</h4>
+<table border="0">
+<tr><td><a href="#ref.soap.is_soap_fault">is_soap_fault</a> -- checks if SOAP call was failed</td></tr>
+<tr><td><a href="#ref.soap.soapclient.soapclient">SoapClient::SoapClient</a> -- SoapClient constructor</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__call">SoapClient::__call</a> -- calls a SOAP function</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__getlastrequest">SoapClient::__getLastRequest</a> -- returns last SOAP request</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__getlastresponse">SoapClient::__getLastResponse</a> -- returns last SOAP response</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__getfunctions">SoapClient::__getFunctions</a> -- returns list of SOAP functions</td></tr>
+<tr><td><a href="#ref.soap.soapclient.__gettypes">SoapClient::__getTypes</a> -- returns list of SOAP types</td></tr>
+<tr><td><a href="#ref.soap.soapserver.soapserver">SoapServer::SoapServer</a> -- SoapServer constructor</td></tr>
+<tr><td><a href="#ref.soap.soapserver.addfunction">SoapServer::addFunction</a> -- adds one or several functions those will handle SOAP requests</td></tr>
+<tr><td><a href="#ref.soap.soapserver.setclass">SoapServer::setClass</a> -- sets class which will handle SOAP requests</td></tr>
+<tr><td><a href="#ref.soap.soapserver.getfunctions">SoapServer::getFunctions</a> -- returns list of defined functions</td></tr>
+<tr><td><a href="#ref.soap.soapserver.setpersistence">SoapServer::setPersistence</a> -- sets persistence mode of SoapServer</td></tr>
+<tr><td><a href="#ref.soap.soapserver.handle">SoapServer::handle</a> -- handles a SOAP request</td></tr>
+<tr><td><a href="#ref.soap.soapparam.soapparam">SoapParam::SoapParam</a> -- SoapParam constructor</td></tr>
+<tr><td><a href="#ref.soap.soapvar.soapvar">SoapVar::SoapVar</a> -- SoapVar constructor</td></tr>
+<tr><td><a href="#ref.soap.soapheader.soapheader">SoapHeader::SoapHeader</a> -- SoapHeader constructor</td></tr>
+<tr><td><a href="#ref.soap.soapfault.soapfault">SoapFault::SoapFault</a> -- SoapFault constructor</td></tr>
+</table>
+
+<a name="ref.soap.is_soap_fault"></a>
+<h2>is_soap_fault</h2>
+<p>(PHP 5)</p>
+<p>checks if SOAP call was failed</p>
+<h3>Description</h3>
+<p>bool <b>is_soap_fault</b>(mixed obj)</p>
+<p>
+This function is useful when you like to check if the SOAP call was failed,
+but don't like to use exceptions. To use it you must create SoapClient object
+with <b>exceptions</b> option set to zero or false. In this case SOAP method
+will return a special SoapFault object which encapsulate the fault details
+(faultcode, faultstring, faultactor and faultdetails). If <b>exceptions</b> is
+not set then SOAP call will throw an exception on error.<br>
+is_soap_fault() functions checks if the given parameter is a SoapFault object.<br>
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = SoapClient("some.wsdl",array("exceptions"=>0));
+ $result = $client->SomeFunction(...);
+ if (is_soap_fault($result)) {
+ trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faulstring})", E_ERROR);
+ }
+?&gt;</PRE></TD></TR></TABLE>
+<p>Standard method that used by SOAP extension for error reporting is excptions.</p>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ try {
+ $client = SoapClient("some.wsdl");
+ $result = $client->SomeFunction(...);
+ } catch (SoapFault $fault) {
+ trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faulstring})", E_ERROR);
+ }
+?&gt;</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapclient.soapclient"></a>
+<h2>SoapClient::SoapClient</h2>
+<p>(PHP 5)</p>
+<p>SoapClient constructor</p>
+<h3>Description</h3>
+<p><b>SoapClient</b>(mixed wsdl [, array options])</p>
+<p>
+The constructor allows creating SoapClient objects in WSDL or nonWSDL mode.
+The first case requires URI of WSDL file as first parameter and optional
+options array. The second case requires NULL as first parameter and options
+array with <b>location</b> and <b>uri</b> options set. Where <b>location</b> is
+a URL to request and <b>uri</b> is a target namespace of the SOAP service.
+<b>style</b> and <b>use</b> options has effect only on nonWSDL (in WSDL mode
+they comes from WSDL file). <b>soap_version</b> option allows to work as SOAP 1.1 or
+SOAP 1.2 client.
+Some additional optional options allow using HTTP authentication (<b>login</b>
+and <b>password</b>) and HTTP connection through proxy server (<b>proxy_host</b>,
+<b>proxy_port</b>, <b>proxy_login</b> and <b>proxy_password</b>).
+</p>
+<h4>Examples</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+ $client = new SoapClient("some.wsdl");
+
+ $client = new SoapClient("some.wsdl",array('soap_version' => SOAP_1_2));
+
+ $client = new SoapClient("some.wsdl",array('login' => "some_name",
+ 'password' => "some_password"));
+
+ $client = new SoapClient("some.wsdl",array('proxy_host' => "localhost",
+ 'proxy_port' => 8080));
+
+ $client = new SoapClient("some.wsdl",array('proxy_host' => "localhost",
+ 'proxy_port' => 8080,
+ 'proxy_login' => "some_name",
+ 'proxy_password' => "some_password"));
+
+ $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
+ 'uri' => "http://test-uri/"));
+
+ $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
+ 'uri' => "http://test-uri/",
+ 'style' => SOAP_DOCUMENT,
+ 'use' => SOAP_LITERAL));
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapclient.__call"></a>
+<h2>SoapClient::__call</h2>
+<p>(PHP 5)</p>
+<p>calls a SOAP function</p>
+<h3>Description</h3>
+<p>mixed <b>__call</b>(string function_name, array arguments, [array options [, mixed input_headers [, mixed &output_headers]]])</p>
+<p>
+This is a low level API function to make a SOAP call. Usually in WSDL mode
+you can simple call SOAP functions as SoapClient methods. It is useful for
+nonWSDL mode when 'soapaction' is unknown, 'uri' is differ form default or
+when ypu like to send and/or receive SOAP Headers. To check if function call
+is failed check the result with is_soap_fault() function.<br>
+SOAP function may return one or several values. In the first case __call will
+return just the value of output parameter, in the second it will return
+array with named output parameters.
+</p>
+<h4>Examples</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+ $client = new SoapClient("some.wsdl");
+ $client->SomeFunction($a,$b,$c);
+ $client->__call("SomeFunction",array($a,$b,$c));
+ $client->__call("SomeFunction",array($a,$b,$c), NULL,
+ new SoapHeader(...), $output_headers);
+
+
+ $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
+ 'uri' => "http://test-uri/"));
+ $client->SomeFunction($a,$b,$c);
+ $client->__call("SomeFunction",array($a,$b,$c));
+ $client->__call("SomeFunction",array($a,$b,$c),
+ array('soapaction' => 'some_action',
+ 'uri' => 'some_uri'));
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapclient.__getlastrequest"></a>
+<h2>SoapClient::__getLastRequest</h2>
+<p>(PHP 5)</p>
+<p>returns last SOAP request</p>
+<h3>Description</h3>
+<p>string <b>__getLastRequest</b>()</p>
+<p>
+This function works only with SoapClient which was created with trace option.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = SoapClient("some.wsdl", array('trace'=>1));
+ $result = $client->SomeFunction(...);
+ echo "REQUEST:\n".$client->__getLastRequest()."\n";
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapclient.__getlastresponse"></a>
+<h2>SoapClient::__getLastResponse</h2>
+<p>(PHP 5)</p>
+<p>returns last SOAP response</p>
+<h3>Description</h3>
+<p>string <b>__getLastResponse</b>()</p>
+<p>
+This function works only with SoapClient which was created with trace option.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = SoapClient("some.wsdl", array('trace'=>1));
+ $result = $client->SomeFunction(...);
+ echo "RESPONSE:\n".$client->__getLastResponse()."\n";
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapclient.__getfunctions"></a>
+<h2>SoapClient::__getFunctions</h2>
+<p>(PHP 5)</p>
+<p>returns list of SOAP functions</p>
+<h3>Description</h3>
+<p>array <b>__getFunctions</b>()</p>
+<p>
+This function works only in WSDL mode.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = SoapClient("some.wsdl");
+ var_dump($client->__getFunctions());
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapclient.__gettypes"></a>
+<h2>SoapClient::__getTypes</h2>
+<p>(PHP 5)</p>
+<p>returns list of SOAP types</p>
+<h3>Description</h3>
+<p>array <b>__getTypes</b>()</p>
+<p>
+This function works only in WSDL mode.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = SoapClient("some.wsdl");
+ var_dump($client->__getTypes());
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapserver.soapserver"></a>
+<h2>SoapServer::SoapServer</h2>
+<p>(PHP 5)</p>
+<p>SoapServer constructor</p>
+<h3>Description</h3>
+<p><b>SoapServer</b>(mixed wsdl [, array options])</p>
+It allows creating SoapServer objects in WSDL or nonWSDL mode. In the first
+case <b>wsdl</b> must be set to URI of WSDL file. In the second <b>wsdl</b>
+must be set to null and <b>uti</b> option must be set. Additional options
+allow setting a default SOAP version (<b>soap_version</b>) and actor URI
+(<b>actor</b>).
+
+<h4>Examples</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+ $server = new SoapServer("some.wsdl");
+
+ $server = new SoapServer("some.wsdl",array('soap_version'=>SOAP_1_2));
+
+ $server = new SoapServer("some.wsdl",array('actor'=>"http://example.org/ts-tests/C"));
+
+ $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapserver.addfunction">
+<h2>SoapServer::addFunction</h2>
+<p>(PHP 5)</p>
+<p>adds one or several functions those will handle SOAP requests</p>
+<h3>Description</h3>
+<p>void <b>addFunction</b>(mixed functions)</p>
+Exports one or more functions for remote clients. To export one function pass
+function name into <b>functions</b> parameter as string. To export several
+functions pass an array of function names and to export all functions pass
+a special constant <b>SOAP_FUNCTIONS_ALL</b>.<br>
+Functions must receive all input arguments in the same order as defined
+in WSDL file (They should not receive any output parameters as arguments) and
+return one or more values. To return several values they must return array with
+named output parameters.
+<h4>Examples</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+ function func($inputString) {
+ return $inputString;
+ }
+ $server->addFunction("echoString");
+
+ function echoTwoStrings($inputString1, $inputString2) {
+ return array("outputString1"=>$inputString1,"outputString2"=>$inputString2);
+ }
+ $server->addFunction(array("echoString","echoTwoStrings"));
+
+ $server->addFunction(SOAP_FUNCTIONS_ALL);
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapserver.setclass"></a>
+<h2>SoapServer::setClass</h2>
+<p>(PHP 5)</p>
+<p>sets class which will handle SOAP requests</p>
+<h3>Description</h3>
+<p>void <b>setClass</b>(string class_name [, ...])</p>
+Exports all methods from specified class. Additional parameters will be passed
+to default class constructor during object creation. The object can be maiden
+persistent across request for a given PHP session with
+<a href="#ref.soap.soapserver.setpersistence">SoapServer::setPersistence</a> method.
+<h4>Examples</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+ $server->setClass("foo");
+
+ $server->setClass("foo", $arg1, $arg2);
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapserver.getfunctions">
+<h2>SoapServer::getFunctions</h2>
+<p>(PHP 5)</p>
+<p>returns list of defined functions</p>
+<h3>Description</h3>
+<p>array <b>getFunctions</b>()</p>
+
+<a name="ref.soap.soapserver.setpersistence"></a>
+<h2>SoapServer::setPersistence</h2>
+<p>(PHP 5)</p>
+<p>sets persistence mode of SoapServer</p>
+<h3>Description</h3>
+<p>void <b>setPersistence</b>(int mode)</p>
+This function allows saving data between requests in PHP session. It works only
+with server that exports functions form class (see
+<a href="#ref.soap.soapserver.setclass">SoapServer:setCalss</a>).
+<h4>Examples</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+ $server->setpersistence(SOAP_PERSISTENCE_SESSION);
+
+ $server->setpersistence(SOAP_PERSISTENCE_REQUEST);
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapserver.handle"></a>
+<h2>SoapServer::handle</h2>
+<p>(PHP 5)</p>
+<p>handles a SOAP request</p>
+<h3>Description</h3>
+<p>void <b>handle</b>([string soap_envelope])</p>
+It processes a SOAP request, call necessary functions, and send response back.
+It assumes request in input parameter or in global <b>$HTTP_RAW_POST_DATA</b> PHP variable
+if the argument is omitted.
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ function test($x) {
+ return $x;
+ }
+
+ $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
+ $server->addFunction("test");
+ $server->handle();
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapparam.soapparam"></a>
+<h2>SoapParam::SoapParam</h2>
+<p>(PHP 5)</p>
+<p>SoapParam constructor</p>
+<h3>Description</h3>
+<p><b>SoapParam</b>(mixed data, string name)</p>
+<p>
+SoapParam is a special low-level class for naming parameters and return values
+in nonWSDL mode. It is just a data holder and it has not any special method
+except constructor. The constructor takes <b>data</b> to pass or return and
+<b>name</b>. It is possible to pass parameter directly as PHP value, but in
+this case it will be named as <b><i>paramN</i></b> and SOAP Service may not
+understand it.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
+ 'uri' => "http://test-uri/"));
+ $client->SomeFunction(new SoapParam($a,"a"),
+ new SoapParam($b,"b"),
+ new SoapParam($c,"c"));
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapvar.soapvar"></a>
+<h2>SoapVar::SoapVar</h2>
+<p>(PHP 5)</p>
+<p>SoapVar constructor</p>
+<h3>Description</h3>
+<p><b>SoapVar</b>(mixed data, int encoding [, string type [, string type_ns [, string name [, string name_ns]]]])</p>
+<p>
+SoapVar is a special low-level class for encoding parameters and return values
+in nonWSDL mode. It is just a data holder and it has not any special method
+except constructor. It is useful when you like to set type property in SOAP
+request or response. The constructor takes <b>data</b> to pass or return,
+<b>encoding</b> ID to encode it (see <b><i>XSD_...</i></b> constants) and as
+option type name and namespace and value name and namespace.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ class SOAPStruct {
+ function SOAPStruct($s, $i, $f) {
+ $this->varString = $s;
+ $this->varInt = $i;
+ $this->varFloat = $f;
+ }
+ }
+ $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
+ 'uri' => "http://test-uri/"));
+ $struct = new SOAPStruct('arg',34,325.325);
+ $soapstruct = new SoapVar($struct,SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd");
+ $client->echoStruct(new SoapParam($soapstruct, "inputStruct"));
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapheader.soapheader"></a>
+<h2>SoapHeader::SoapHeader</h2>
+<p>(PHP 5)</p>
+<p>SoapHeader constructor</p>
+<h3>Description</h3>
+<p><b>SoapHeader</b>(string name_ns, string name [, mixed data [, bool must_understand [, mixed actor]]])</p>
+<p>
+SoapHeader is a special low-level class for passing or returning SOAP headers.
+It is just a data holder and it has not any special method except constructor.
+It can be used in <a href="#ref.soap.soapclient.__call">SoapClient::__call</a>
+method to pass SOAP header or in SOAP header handler to return header in SOAP
+response. <b>name_ns</b> and <b>name</b> are namespace and name of the SOAP
+header element. <b>data</b> is a SOAP header's content. It can be a PHP value
+or SoapVar object. <b>must_understand</b> and <b>actor</b> are values for
+<b><i>mustUnderstand</i></b> and <b><i>actor</i></b> attributes of this SOAP
+Header element.
+</p>
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ $client = new SoapClient(null,array('location' => "http://localhost/soap.php",
+ 'uri' => "http://test-uri/"));
+ $client->__call("echoVoid",NULL,NULL,
+ new SoapHeader('http://soapinterop.org/echoheader/',
+ 'echoMeStringRequest',
+ 'hello world'));
+?&gt;
+</PRE></TD></TR></TABLE>
+
+<a name="ref.soap.soapfault.soapfault"></a>
+<h2>SoapFault::SoapFault</h2>
+<p>(PHP 5)</p>
+<p>SoapFault constructor</p>
+<h3>Description</h3>
+<p><b>SoapFault</b>(string faultcode, string faultstring [, string faultactor [, mixed details [, string faultname [, mixed headerfault]]]])</p>
+This class is useful when you like to send SOAP fault response from PHP handler.<br>
+<b>faultcode</b>, <b>faultstring</b>, <b>faultactor</b> and <b>details</b> are standard elements of SOAP Fault;<br>
+<b>faultname</b> is an optional parameter that can be used to select proper fault encoding from WSDL.<br>
+<b>headerfault</b> is an optional parameter that can be used during SOAP header handling to report error in response header.
+<h4>Example</h4>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ function test($x) {
+ return new SoapFault("Server","Some error message");
+ }
+
+ $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
+ $server->addFunction("test");
+ $server->handle();
+?&gt;
+</PRE></TD></TR></TABLE>
+<p>It is possible to use PHP exception mechanism to throw SOAP Fault.</p>
+<TABLE BORDER="0" BGCOLOR="#E0E0E0"><TR><TD><PRE CLASS="php">
+&lt;?php
+ function test($x) {
+ throw new SoapFault("Server","Some error message");
+ }
+
+ $server = new SoapServer(null,array('uri'=>"http://test-uri/"));
+ $server->addFunction("test");
+ $server->handle();
+?&gt;
+</PRE></TD></TR></TABLE>
+</BODY>
</HTML> \ No newline at end of file
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index ef16a9bb2..62abbe5fd 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.156.2.28.2.30.2.32 2009/02/18 13:25:48 dmitry Exp $ */
+/* $Id: soap.c 287746 2009-08-26 14:05:48Z dmitry $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2128,8 +2128,13 @@ PHP_METHOD(SoapServer, fault)
char *code, *string, *actor=NULL, *name=NULL;
int code_len, string_len, actor_len = 0, name_len = 0;
zval* details = NULL;
+ soapServicePtr service;
+ xmlCharEncodingHandlerPtr old_encoding;
SOAP_SERVER_BEGIN_CODE();
+ FETCH_THIS_SERVICE(service);
+ old_encoding = SOAP_GLOBAL(encoding);
+ SOAP_GLOBAL(encoding) = service->encoding;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|szs",
&code, &code_len, &string, &string_len, &actor, &actor_len, &details,
@@ -2138,6 +2143,8 @@ PHP_METHOD(SoapServer, fault)
}
soap_server_fault(code, string, actor, details, name TSRMLS_CC);
+
+ SOAP_GLOBAL(encoding) = old_encoding;
SOAP_SERVER_END_CODE();
}
/* }}} */
diff --git a/ext/soap/tests/bugs/bug47273.phpt b/ext/soap/tests/bugs/bug47273.phpt
new file mode 100644
index 000000000..174948f59
--- /dev/null
+++ b/ext/soap/tests/bugs/bug47273.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Bug #47273 (Encoding bug in SoapServer->fault)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+unicode.script_encoding=ISO-8859-1
+unicode.output_encoding=ISO-8859-1
+--FILE--
+<?php
+$request1 = <<<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://127.0.0.1:8080/test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test1/></SOAP-ENV:Body></SOAP-ENV:Envelope>
+EOF;
+$request2 = <<<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://127.0.0.1:8080/test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test2/></SOAP-ENV:Body></SOAP-ENV:Envelope>
+EOF;
+
+class SoapFaultTest
+{
+ public function test1() {
+ // Test #1
+ return 'Test #1 exception with some special chars: Äßö';
+ }
+ public function test2() {
+ // Test #2
+ //throw new SoapFault('Server', 'Test #2 exception with some special chars: Äßö');
+ throw new Exception('Test #2 exception with some special chars: Äßö');
+ }
+}
+
+$server = new SoapServer(null, array(
+'uri' => "http://127.0.0.1:8080/test/",
+'encoding' => 'ISO-8859-1'));
+$server->setClass('SoapFaultTest');
+
+try {
+ $server->handle($request1);
+} catch (Exception $e) {
+ $server->fault("Sender", $e->getMessage());
+}
+try {
+ $server->handle($request2);
+} catch (Exception $e) {
+ $server->fault("Sender", $e->getMessage());
+}
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://127.0.0.1:8080/test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test1Response><return xsi:type="xsd:string">Test #1 exception with some special chars: Äßö</return></ns1:test1Response></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>Sender</faultcode><faultstring>Test #2 exception with some special chars: Äßö</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
+
diff --git a/ext/soap/tests/bugs/xml.xsd b/ext/soap/tests/bugs/xml.xsd
index 7d599db74..abb844ac1 100644
--- a/ext/soap/tests/bugs/xml.xsd
+++ b/ext/soap/tests/bugs/xml.xsd
@@ -1,34 +1,34 @@
-<?xml version='1.0'?>
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
-<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
-
- <xs:attribute name="lang" type="xs:language">
- <xs:annotation>
- <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
- codes as the enumerated possible values . . .</xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- <xs:attribute name="space" default="preserve">
- <xs:simpleType>
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="default"/>
- <xs:enumeration value="preserve"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
-
- <xs:attribute name="base" type="xs:anyURI">
- <xs:annotation>
- <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
- information about this attribute.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- <xs:attributeGroup name="specialAttrs">
- <xs:attribute ref="xml:base"/>
- <xs:attribute ref="xml:lang"/>
- <xs:attribute ref="xml:space"/>
- </xs:attributeGroup>
-
-</xs:schema>
+<?xml version='1.0'?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:attribute name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>
diff --git a/ext/soap/tests/schema/test_schema.inc b/ext/soap/tests/schema/test_schema.inc
index 8c7d9d034..bfc4ce0db 100644
--- a/ext/soap/tests/schema/test_schema.inc
+++ b/ext/soap/tests/schema/test_schema.inc
@@ -1,77 +1,77 @@
-<?php
-$val = null;
-
-function test($input) {
- global $val;
- $val = $input;
-}
-
-function test_schema($schema,$type,$param,$style="rpc",$use="encoded", $attributeFormDefault='',$features=0) {
- global $HTTP_RAW_POST_DATA, $val;
-$wsdl = <<<EOF
-<definitions name="InteropTest"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:tns="http://test-uri/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- targetNamespace="http://test-uri/"
- >
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test-uri/" $attributeFormDefault>
- <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
- $schema
- </schema>
- </types>
- <message name="testMessage">
- <part name="testParam" $type/>
- </message>
- <portType name="testPortType">
- <operation name="test">
- <input message="testMessage"/>
- </operation>
- </portType>
- <binding name="testBinding" type="testPortType">
- <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="test">
- <soap:operation soapAction="#test" style="$style"/>
- <input>
- <soap:body use="$use" namespace="http://test-uri/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
- </input>
- </operation>
- </binding>
- <service name="testService">
- <port name="testPort" binding="tns:testBinding">
- <soap:address location="test://" />
- </port>
- </service>
-</definitions>
-EOF;
-
- $fname = tempnam ("./", "wsdl");
- $f = fopen($fname,"w");
- fwrite($f,$wsdl);
- fclose($f);
- ini_set("soap.wsdl_cache_enabled",0);
- $x = new SoapClient($fname, array("trace"=>1,"exceptions"=>0,"features"=>$features));
- $y = new SoapServer($fname, array("features"=>$features));
- $y->addfunction("test");
- unlink($fname);
-
- $x->test($param);
- $xml = xml_parser_create();
- $req = $x->__getlastrequest();
- if ($style == "rpc") {
- $HTTP_RAW_POST_DATA = $req;
- ob_start();
- $y->handle($HTTP_RAW_POST_DATA);
- ob_end_clean();
- echo $req;
- var_dump($val);
- } else {
- echo $req;
- }
-}
-?>
+<?php
+$val = null;
+
+function test($input) {
+ global $val;
+ $val = $input;
+}
+
+function test_schema($schema,$type,$param,$style="rpc",$use="encoded", $attributeFormDefault='',$features=0) {
+ global $HTTP_RAW_POST_DATA, $val;
+$wsdl = <<<EOF
+<definitions name="InteropTest"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://test-uri/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://test-uri/"
+ >
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test-uri/" $attributeFormDefault>
+ <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+ <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
+ $schema
+ </schema>
+ </types>
+ <message name="testMessage">
+ <part name="testParam" $type/>
+ </message>
+ <portType name="testPortType">
+ <operation name="test">
+ <input message="testMessage"/>
+ </operation>
+ </portType>
+ <binding name="testBinding" type="testPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="#test" style="$style"/>
+ <input>
+ <soap:body use="$use" namespace="http://test-uri/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ </operation>
+ </binding>
+ <service name="testService">
+ <port name="testPort" binding="tns:testBinding">
+ <soap:address location="test://" />
+ </port>
+ </service>
+</definitions>
+EOF;
+
+ $fname = tempnam ("./", "wsdl");
+ $f = fopen($fname,"w");
+ fwrite($f,$wsdl);
+ fclose($f);
+ ini_set("soap.wsdl_cache_enabled",0);
+ $x = new SoapClient($fname, array("trace"=>1,"exceptions"=>0,"features"=>$features));
+ $y = new SoapServer($fname, array("features"=>$features));
+ $y->addfunction("test");
+ unlink($fname);
+
+ $x->test($param);
+ $xml = xml_parser_create();
+ $req = $x->__getlastrequest();
+ if ($style == "rpc") {
+ $HTTP_RAW_POST_DATA = $req;
+ ob_start();
+ $y->handle($HTTP_RAW_POST_DATA);
+ ob_end_clean();
+ echo $req;
+ var_dump($val);
+ } else {
+ echo $req;
+ }
+}
+?>
diff --git a/ext/soap/tests/soap12/soap12-test.inc b/ext/soap/tests/soap12/soap12-test.inc
index 7b2e2efea..fbdc855a7 100644
--- a/ext/soap/tests/soap12/soap12-test.inc
+++ b/ext/soap/tests/soap12/soap12-test.inc
@@ -1,131 +1,131 @@
-<?php
-class Soap12test {
- public $header;
-
- function echoOk($x) {
- return $x;
- }
-
- function echoString($inputString) {
- return $inputString;
- }
-
- function echoStringArray($inputStringArray) {
- return $inputStringArray;
- }
-
- function echoInteger($inputInteger) {
- return $inputInteger;
- }
-
- function echoIntegerArray($inputIntegerArray) {
- return $inputIntegerArray;
- }
-
- function echoFloat($inputFloat) {
- return $inputFloat;
- }
-
- function echoFloatArray($inputFloatArray) {
- return $inputFloatArray;
- }
-
- function echoStruct($x) {
- return $x;
- }
-
- function echoStructArray($x) {
- return $x;
- }
-
- function echoVoid() {
- return NULL;
- }
-
- function echoBase64($b_encoded) {
- return $b_encoded;
- }
-
- function echoDate($timeInstant) {
- return $timeInstant;
- }
-
- function echoHexBinary($hb) {
- return $hb;
- }
-
- function echoDecimal($dec) {
- return $dec;
- }
-
- function echoBoolean($boolean) {
- return $boolean;
- }
-
- function echoStructAsSimpleTypes ($struct) {
- return array('outputString' => $struct->varString,
- 'outputInteger' => $struct->varInt,
- 'outputFloat' => $struct->varFloat);
- }
-
- function echoSimpleTypesAsStruct($string, $int, $float) {
- return (object)array("varString" => $string,
- "varInt" => $int,
- "varFloat" => $float);
- }
-
- function echoNestedStruct($struct) {
- return $struct;
- }
-
- function echo2DStringArray($ary) {
- return $ary;
- }
-
- function echoNestedArray($ary) {
- return $ary;
- }
-
- function countItems($input) {
- return count($input);
- }
-
- function isNil($input) {
- return is_null($input);
- }
-
- function returnVoid() {
- }
-
- function emptyBody() {
- }
-
- function requiredHeader($x) {
- $this->header = $x;
- }
-
- function echoHeader() {
- return $this->header;
- }
-
- function echoResolvedRef($ref) {
- return $ref->RelativeReference->base.$ref->RelativeReference->href;
- }
-
- function validateCountryCode($code) {
- if (strlen($code) != 2) {
- return new SoapFault("Client", "Not a valid country code", NULL, NULL, NULL, new SoapHeader("http://example.org/ts-tests", "validateCountryCodeFault", "Country code must be 2 letters."));
- } else {
- return "OK";
- }
- }
-
-}
-
-ini_set("soap.wsdl_cache_enabled",0);
-$server = new soapserver(dirname(__FILE__)."/soap12-test.wsdl", array('soap_version'=>SOAP_1_2,'actor'=>"http://example.org/ts-tests/C"));
-$server->setClass("Soap12test");
-
-$server->handle($HTTP_RAW_POST_DATA);
-echo "ok\n";
-?>
+<?php
+class Soap12test {
+ public $header;
+
+ function echoOk($x) {
+ return $x;
+ }
+
+ function echoString($inputString) {
+ return $inputString;
+ }
+
+ function echoStringArray($inputStringArray) {
+ return $inputStringArray;
+ }
+
+ function echoInteger($inputInteger) {
+ return $inputInteger;
+ }
+
+ function echoIntegerArray($inputIntegerArray) {
+ return $inputIntegerArray;
+ }
+
+ function echoFloat($inputFloat) {
+ return $inputFloat;
+ }
+
+ function echoFloatArray($inputFloatArray) {
+ return $inputFloatArray;
+ }
+
+ function echoStruct($x) {
+ return $x;
+ }
+
+ function echoStructArray($x) {
+ return $x;
+ }
+
+ function echoVoid() {
+ return NULL;
+ }
+
+ function echoBase64($b_encoded) {
+ return $b_encoded;
+ }
+
+ function echoDate($timeInstant) {
+ return $timeInstant;
+ }
+
+ function echoHexBinary($hb) {
+ return $hb;
+ }
+
+ function echoDecimal($dec) {
+ return $dec;
+ }
+
+ function echoBoolean($boolean) {
+ return $boolean;
+ }
+
+ function echoStructAsSimpleTypes ($struct) {
+ return array('outputString' => $struct->varString,
+ 'outputInteger' => $struct->varInt,
+ 'outputFloat' => $struct->varFloat);
+ }
+
+ function echoSimpleTypesAsStruct($string, $int, $float) {
+ return (object)array("varString" => $string,
+ "varInt" => $int,
+ "varFloat" => $float);
+ }
+
+ function echoNestedStruct($struct) {
+ return $struct;
+ }
+
+ function echo2DStringArray($ary) {
+ return $ary;
+ }
+
+ function echoNestedArray($ary) {
+ return $ary;
+ }
+
+ function countItems($input) {
+ return count($input);
+ }
+
+ function isNil($input) {
+ return is_null($input);
+ }
+
+ function returnVoid() {
+ }
+
+ function emptyBody() {
+ }
+
+ function requiredHeader($x) {
+ $this->header = $x;
+ }
+
+ function echoHeader() {
+ return $this->header;
+ }
+
+ function echoResolvedRef($ref) {
+ return $ref->RelativeReference->base.$ref->RelativeReference->href;
+ }
+
+ function validateCountryCode($code) {
+ if (strlen($code) != 2) {
+ return new SoapFault("Client", "Not a valid country code", NULL, NULL, NULL, new SoapHeader("http://example.org/ts-tests", "validateCountryCodeFault", "Country code must be 2 letters."));
+ } else {
+ return "OK";
+ }
+ }
+
+}
+
+ini_set("soap.wsdl_cache_enabled",0);
+$server = new soapserver(dirname(__FILE__)."/soap12-test.wsdl", array('soap_version'=>SOAP_1_2,'actor'=>"http://example.org/ts-tests/C"));
+$server->setClass("Soap12test");
+
+$server->handle($HTTP_RAW_POST_DATA);
+echo "ok\n";
+?>