summaryrefslogtreecommitdiff
path: root/ext/soap/tests/schema
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /ext/soap/tests/schema
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/soap/tests/schema')
-rw-r--r--ext/soap/tests/schema/schema001.phpt20
-rw-r--r--ext/soap/tests/schema/schema002.phpt23
-rw-r--r--ext/soap/tests/schema/schema003.phpt23
-rw-r--r--ext/soap/tests/schema/schema004.phpt22
-rw-r--r--ext/soap/tests/schema/schema005.phpt24
-rw-r--r--ext/soap/tests/schema/schema006.phpt25
-rw-r--r--ext/soap/tests/schema/schema007.phpt25
-rw-r--r--ext/soap/tests/schema/schema008.phpt27
-rw-r--r--ext/soap/tests/schema/schema009.phpt20
-rw-r--r--ext/soap/tests/schema/schema010.phpt20
-rw-r--r--ext/soap/tests/schema/schema011.phpt24
-rw-r--r--ext/soap/tests/schema/schema012.phpt24
-rw-r--r--ext/soap/tests/schema/schema013.phpt20
-rw-r--r--ext/soap/tests/schema/schema014.phpt22
-rw-r--r--ext/soap/tests/schema/schema015.phpt30
-rw-r--r--ext/soap/tests/schema/schema016.phpt32
-rw-r--r--ext/soap/tests/schema/schema017.phpt29
-rw-r--r--ext/soap/tests/schema/schema018.phpt27
-rw-r--r--ext/soap/tests/schema/schema019.phpt27
-rw-r--r--ext/soap/tests/schema/schema020.phpt29
-rw-r--r--ext/soap/tests/schema/schema021.phpt24
-rw-r--r--ext/soap/tests/schema/schema022.phpt26
-rw-r--r--ext/soap/tests/schema/schema023.phpt29
-rw-r--r--ext/soap/tests/schema/schema024.phpt31
-rw-r--r--ext/soap/tests/schema/schema025.phpt30
-rw-r--r--ext/soap/tests/schema/schema026.phpt31
-rw-r--r--ext/soap/tests/schema/schema027.phpt35
-rw-r--r--ext/soap/tests/schema/schema028.phpt36
-rw-r--r--ext/soap/tests/schema/schema029.phpt38
-rw-r--r--ext/soap/tests/schema/schema030.phpt28
-rw-r--r--ext/soap/tests/schema/schema031.phpt28
-rw-r--r--ext/soap/tests/schema/schema032.phpt26
-rw-r--r--ext/soap/tests/schema/schema033.phpt36
-rw-r--r--ext/soap/tests/schema/schema034.phpt37
-rw-r--r--ext/soap/tests/schema/schema035.phpt38
-rw-r--r--ext/soap/tests/schema/schema036.phpt37
-rw-r--r--ext/soap/tests/schema/schema037.phpt28
-rw-r--r--ext/soap/tests/schema/schema038.phpt29
-rw-r--r--ext/soap/tests/schema/schema039.phpt31
-rw-r--r--ext/soap/tests/schema/schema040.phpt32
-rw-r--r--ext/soap/tests/schema/schema041.phpt31
-rw-r--r--ext/soap/tests/schema/schema042.phpt29
-rw-r--r--ext/soap/tests/schema/schema043.phpt38
-rw-r--r--ext/soap/tests/schema/schema044.phpt29
-rw-r--r--ext/soap/tests/schema/schema045.phpt36
-rw-r--r--ext/soap/tests/schema/schema046.phpt38
-rw-r--r--ext/soap/tests/schema/schema047.phpt34
-rw-r--r--ext/soap/tests/schema/schema048.phpt36
-rw-r--r--ext/soap/tests/schema/schema049.phpt35
-rw-r--r--ext/soap/tests/schema/schema050.phpt28
-rw-r--r--ext/soap/tests/schema/schema051.phpt33
-rw-r--r--ext/soap/tests/schema/schema052.phpt28
-rw-r--r--ext/soap/tests/schema/schema053.phpt26
-rw-r--r--ext/soap/tests/schema/schema054.phpt23
-rw-r--r--ext/soap/tests/schema/schema055.phpt30
-rw-r--r--ext/soap/tests/schema/schema056.phpt29
-rw-r--r--ext/soap/tests/schema/schema057.phpt31
-rw-r--r--ext/soap/tests/schema/schema058.phpt30
-rw-r--r--ext/soap/tests/schema/schema059.phpt31
-rw-r--r--ext/soap/tests/schema/schema060.phpt36
-rw-r--r--ext/soap/tests/schema/schema061.phpt38
-rw-r--r--ext/soap/tests/schema/schema062.phpt29
-rw-r--r--ext/soap/tests/schema/schema063.phpt18
-rw-r--r--ext/soap/tests/schema/schema064.phpt61
-rw-r--r--ext/soap/tests/schema/schema065.phpt26
-rw-r--r--ext/soap/tests/schema/schema066.phpt26
-rw-r--r--ext/soap/tests/schema/schema067.phpt26
-rw-r--r--ext/soap/tests/schema/schema068.phpt18
-rw-r--r--ext/soap/tests/schema/schema069.phpt27
-rw-r--r--ext/soap/tests/schema/schema070.phpt29
-rw-r--r--ext/soap/tests/schema/schema071.phpt23
-rw-r--r--ext/soap/tests/schema/schema072.phpt25
-rw-r--r--ext/soap/tests/schema/schema073.phpt24
-rw-r--r--ext/soap/tests/schema/schema074.phpt29
-rw-r--r--ext/soap/tests/schema/schema075.phpt30
-rw-r--r--ext/soap/tests/schema/schema076.phpt30
-rw-r--r--ext/soap/tests/schema/schema077.phpt30
-rw-r--r--ext/soap/tests/schema/schema078.phpt32
-rw-r--r--ext/soap/tests/schema/schema079.phpt32
-rw-r--r--ext/soap/tests/schema/schema080.phpt32
-rw-r--r--ext/soap/tests/schema/schema081.phpt29
-rw-r--r--ext/soap/tests/schema/schema082.phpt31
-rw-r--r--ext/soap/tests/schema/schema083.phpt30
-rw-r--r--ext/soap/tests/schema/schema084.phpt31
-rw-r--r--ext/soap/tests/schema/schema085.phpt45
-rw-r--r--ext/soap/tests/schema/skipif.inc5
-rw-r--r--ext/soap/tests/schema/test_schema.inc77
87 files changed, 2587 insertions, 0 deletions
diff --git a/ext/soap/tests/schema/schema001.phpt b/ext/soap/tests/schema/schema001.phpt
new file mode 100644
index 0000000..9f2b7e5
--- /dev/null
+++ b/ext/soap/tests/schema/schema001.phpt
@@ -0,0 +1,20 @@
+--TEST--
+SOAP XML Schema 1: simpleType/restriction
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <restriction base="xsd:int"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
diff --git a/ext/soap/tests/schema/schema002.phpt b/ext/soap/tests/schema/schema002.phpt
new file mode 100644
index 0000000..41f3bbe
--- /dev/null
+++ b/ext/soap/tests/schema/schema002.phpt
@@ -0,0 +1,23 @@
+--TEST--
+SOAP XML Schema 2: simpleType/restriction (reference to type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType2">
+ <restriction base="xsd:int"/>
+ </simpleType>
+ <simpleType name="testType">
+ <restriction base="tns:testType2"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
diff --git a/ext/soap/tests/schema/schema003.phpt b/ext/soap/tests/schema/schema003.phpt
new file mode 100644
index 0000000..7599100
--- /dev/null
+++ b/ext/soap/tests/schema/schema003.phpt
@@ -0,0 +1,23 @@
+--TEST--
+SOAP XML Schema 3: simpleType/restriction (reference to type, that is not defined yet)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <restriction base="tns:testType2"/>
+ </simpleType>
+ <simpleType name="testType2">
+ <restriction base="xsd:int"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
diff --git a/ext/soap/tests/schema/schema004.phpt b/ext/soap/tests/schema/schema004.phpt
new file mode 100644
index 0000000..93ed1d1
--- /dev/null
+++ b/ext/soap/tests/schema/schema004.phpt
@@ -0,0 +1,22 @@
+--TEST--
+SOAP XML Schema 4: simpleType/restriction (reference to undefined type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <restriction base="tns:testType2"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema005.phpt b/ext/soap/tests/schema/schema005.phpt
new file mode 100644
index 0000000..1db0c62
--- /dev/null
+++ b/ext/soap/tests/schema/schema005.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SOAP XML Schema 5: simpleType/restriction (inline type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <restriction>
+ <simpleType name="testType2">
+ <restriction base="xsd:int"/>
+ </simpleType>
+ </restriction>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
diff --git a/ext/soap/tests/schema/schema006.phpt b/ext/soap/tests/schema/schema006.phpt
new file mode 100644
index 0000000..e41f275
--- /dev/null
+++ b/ext/soap/tests/schema/schema006.phpt
@@ -0,0 +1,25 @@
+--TEST--
+SOAP XML Schema 6: simpleType/restriction (referenced by ellement)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <restriction>
+ <simpleType name="testType2">
+ <restriction base="xsd:int"/>
+ </simpleType>
+ </restriction>
+ </simpleType>
+ <element name="testElement" type="tns:testType"/>
+EOF;
+test_schema($schema,'element="tns:testElement"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
diff --git a/ext/soap/tests/schema/schema007.phpt b/ext/soap/tests/schema/schema007.phpt
new file mode 100644
index 0000000..fd93c7a
--- /dev/null
+++ b/ext/soap/tests/schema/schema007.phpt
@@ -0,0 +1,25 @@
+--TEST--
+SOAP XML Schema 7: simpleType/restriction (referenced by ellement)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <element name="testElement" type="tns:testType"/>
+ <simpleType name="testType">
+ <restriction>
+ <simpleType name="testType2">
+ <restriction base="xsd:int"/>
+ </simpleType>
+ </restriction>
+ </simpleType>
+EOF;
+test_schema($schema,'element="tns:testElement"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
diff --git a/ext/soap/tests/schema/schema008.phpt b/ext/soap/tests/schema/schema008.phpt
new file mode 100644
index 0000000..1c4005f
--- /dev/null
+++ b/ext/soap/tests/schema/schema008.phpt
@@ -0,0 +1,27 @@
+--TEST--
+SOAP XML Schema 8: simpleType/restriction (anonymous, inside an ellement)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+<element name="testElement">
+ <simpleType>
+ <restriction>
+ <simpleType name="testType2">
+ <restriction base="xsd:int"/>
+ </simpleType>
+ </restriction>
+ </simpleType>
+</element>
+EOF;
+test_schema($schema,'element="tns:testElement"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testElement">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+int(123)
+ok
+
diff --git a/ext/soap/tests/schema/schema009.phpt b/ext/soap/tests/schema/schema009.phpt
new file mode 100644
index 0000000..f7d1024
--- /dev/null
+++ b/ext/soap/tests/schema/schema009.phpt
@@ -0,0 +1,20 @@
+--TEST--
+SOAP XML Schema 9: simpleType/list (as string)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <list itemType="token"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"one two");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(7) "one two"
+ok
diff --git a/ext/soap/tests/schema/schema010.phpt b/ext/soap/tests/schema/schema010.phpt
new file mode 100644
index 0000000..49136b9
--- /dev/null
+++ b/ext/soap/tests/schema/schema010.phpt
@@ -0,0 +1,20 @@
+--TEST--
+SOAP XML Schema 10: simpleType/list (as array)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <list itemType="token"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',array("one","two"));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(7) "one two"
+ok
diff --git a/ext/soap/tests/schema/schema011.phpt b/ext/soap/tests/schema/schema011.phpt
new file mode 100644
index 0000000..8296311
--- /dev/null
+++ b/ext/soap/tests/schema/schema011.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SOAP XML Schema 11: simpleType/list (inline type) (as string)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <list>
+ <simpleType>
+ <restriction base="int"/>
+ </simpleType>
+ </list>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"123 456.7");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(7) "123 456"
+ok
diff --git a/ext/soap/tests/schema/schema012.phpt b/ext/soap/tests/schema/schema012.phpt
new file mode 100644
index 0000000..1d542d8
--- /dev/null
+++ b/ext/soap/tests/schema/schema012.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SOAP XML Schema 12: simpleType/list (inline type) (as array)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <list>
+ <simpleType>
+ <restriction base="int"/>
+ </simpleType>
+ </list>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,456.7));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(7) "123 456"
+ok
diff --git a/ext/soap/tests/schema/schema013.phpt b/ext/soap/tests/schema/schema013.phpt
new file mode 100644
index 0000000..4794d2d
--- /dev/null
+++ b/ext/soap/tests/schema/schema013.phpt
@@ -0,0 +1,20 @@
+--TEST--
+SOAP XML Schema 13: simpleType/union
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union memberTypes="string int float"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"str");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(3) "str"
+ok
diff --git a/ext/soap/tests/schema/schema014.phpt b/ext/soap/tests/schema/schema014.phpt
new file mode 100644
index 0000000..3dab5f3
--- /dev/null
+++ b/ext/soap/tests/schema/schema014.phpt
@@ -0,0 +1,22 @@
+--TEST--
+SOAP XML Schema 14: simpleType/union
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union memberTypes="string int float"/>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema015.phpt b/ext/soap/tests/schema/schema015.phpt
new file mode 100644
index 0000000..fe9b96b
--- /dev/null
+++ b/ext/soap/tests/schema/schema015.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 15: simpleType/union (inline type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType>
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"str");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(3) "str"
+ok
diff --git a/ext/soap/tests/schema/schema016.phpt b/ext/soap/tests/schema/schema016.phpt
new file mode 100644
index 0000000..11e9436
--- /dev/null
+++ b/ext/soap/tests/schema/schema016.phpt
@@ -0,0 +1,32 @@
+--TEST--
+SOAP XML Schema 16: simpleType/union (inline type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType>
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema017.phpt b/ext/soap/tests/schema/schema017.phpt
new file mode 100644
index 0000000..6689c36
--- /dev/null
+++ b/ext/soap/tests/schema/schema017.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 17: union with list
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType>
+ <list itemType="int"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema018.phpt b/ext/soap/tests/schema/schema018.phpt
new file mode 100644
index 0000000..0f3e8b8
--- /dev/null
+++ b/ext/soap/tests/schema/schema018.phpt
@@ -0,0 +1,27 @@
+--TEST--
+SOAP XML Schema 18: union with list
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType>
+ <list itemType="int"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"123.5");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema019.phpt b/ext/soap/tests/schema/schema019.phpt
new file mode 100644
index 0000000..0d2d753
--- /dev/null
+++ b/ext/soap/tests/schema/schema019.phpt
@@ -0,0 +1,27 @@
+--TEST--
+SOAP XML Schema 19: union with list
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType>
+ <list itemType="int"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"123.5 456.7");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(11) "123.5 456.7"
+ok
diff --git a/ext/soap/tests/schema/schema020.phpt b/ext/soap/tests/schema/schema020.phpt
new file mode 100644
index 0000000..344757a
--- /dev/null
+++ b/ext/soap/tests/schema/schema020.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 20: union with list
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType>
+ <list itemType="int"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123.5,456.7));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(11) "123.5 456.7"
+ok
diff --git a/ext/soap/tests/schema/schema021.phpt b/ext/soap/tests/schema/schema021.phpt
new file mode 100644
index 0000000..0628c6b
--- /dev/null
+++ b/ext/soap/tests/schema/schema021.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SOAP XML Schema 21: list of unions
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <list>
+ <simpleType>
+ <union memberTypes="int float str"/>
+ </simpleType>
+ </list>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',"123 123.5 456.7 str");
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123 123.5 456.7 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(19) "123 123.5 456.7 str"
+ok
diff --git a/ext/soap/tests/schema/schema022.phpt b/ext/soap/tests/schema/schema022.phpt
new file mode 100644
index 0000000..a8f5bb9
--- /dev/null
+++ b/ext/soap/tests/schema/schema022.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SOAP XML Schema 22: list of unions
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <list>
+ <simpleType>
+ <union memberTypes="int float str"/>
+ </simpleType>
+ </list>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5,'str'));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:type="ns1:testType">123 123.5 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(13) "123 123.5 str"
+ok
diff --git a/ext/soap/tests/schema/schema023.phpt b/ext/soap/tests/schema/schema023.phpt
new file mode 100644
index 0000000..550bacf
--- /dev/null
+++ b/ext/soap/tests/schema/schema023.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 23: SOAP 1.1 Array
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema024.phpt b/ext/soap/tests/schema/schema024.phpt
new file mode 100644
index 0000000..af836d1
--- /dev/null
+++ b/ext/soap/tests/schema/schema024.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 24: SOAP 1.1 Array (second way)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema025.phpt b/ext/soap/tests/schema/schema025.phpt
new file mode 100644
index 0000000..748e458
--- /dev/null
+++ b/ext/soap/tests/schema/schema025.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 25: SOAP 1.2 Array
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <attribute ref="enc12:itemType" wsdl:itemType="int"/>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="*"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema026.phpt b/ext/soap/tests/schema/schema026.phpt
new file mode 100644
index 0000000..e17b5ac
--- /dev/null
+++ b/ext/soap/tests/schema/schema026.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 26: SOAP 1.2 Array (second way)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema027.phpt b/ext/soap/tests/schema/schema027.phpt
new file mode 100644
index 0000000..e3b382e
--- /dev/null
+++ b/ext/soap/tests/schema/schema027.phpt
@@ -0,0 +1,35 @@
+--TEST--
+SOAP XML Schema 27: SOAP 1.1 Multidimensional array
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[,]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2,1]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema028.phpt b/ext/soap/tests/schema/schema028.phpt
new file mode 100644
index 0000000..7cc4ba5
--- /dev/null
+++ b/ext/soap/tests/schema/schema028.phpt
@@ -0,0 +1,36 @@
+--TEST--
+SOAP XML Schema 28: SOAP 1.2 Multidimensional array
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <attribute ref="enc12:itemType" wsdl:itemType="int"/>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2,1]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema029.phpt b/ext/soap/tests/schema/schema029.phpt
new file mode 100644
index 0000000..2081aff
--- /dev/null
+++ b/ext/soap/tests/schema/schema029.phpt
@@ -0,0 +1,38 @@
+--TEST--
+SOAP XML Schema 29: SOAP 1.2 Multidimensional array (second way)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2,1]" xsi:type="ns1:testType"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema030.phpt b/ext/soap/tests/schema/schema030.phpt
new file mode 100644
index 0000000..e468613
--- /dev/null
+++ b/ext/soap/tests/schema/schema030.phpt
@@ -0,0 +1,28 @@
+--TEST--
+SOAP XML Schema 30: Structure (sequence)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="str" type="string"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["str"]=>
+ string(3) "str"
+}
+ok
diff --git a/ext/soap/tests/schema/schema031.phpt b/ext/soap/tests/schema/schema031.phpt
new file mode 100644
index 0000000..479abfe
--- /dev/null
+++ b/ext/soap/tests/schema/schema031.phpt
@@ -0,0 +1,28 @@
+--TEST--
+SOAP XML Schema 31: Structure (all)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <all>
+ <element name="int" type="int"/>
+ <element name="str" type="string"/>
+ </all>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["str"]=>
+ string(3) "str"
+}
+ok
diff --git a/ext/soap/tests/schema/schema032.phpt b/ext/soap/tests/schema/schema032.phpt
new file mode 100644
index 0000000..47b4af1
--- /dev/null
+++ b/ext/soap/tests/schema/schema032.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SOAP XML Schema 32: Structure (choice)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <choice>
+ <element name="int" type="int"/>
+ <element name="str" type="string"/>
+ </choice>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema033.phpt b/ext/soap/tests/schema/schema033.phpt
new file mode 100644
index 0000000..b504bc0
--- /dev/null
+++ b/ext/soap/tests/schema/schema033.phpt
@@ -0,0 +1,36 @@
+--TEST--
+SOAP XML Schema 33: Nested complex types
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <sequence>
+ <element name="int" type="int"/>
+ </sequence>
+ </complexType>
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="nest" type="tns:testType2"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"nest"=>array("int"=>123.5)));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><nest xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></nest></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["nest"]=>
+ object(stdClass)#%d (1) {
+ ["int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema034.phpt b/ext/soap/tests/schema/schema034.phpt
new file mode 100644
index 0000000..a83d6ea
--- /dev/null
+++ b/ext/soap/tests/schema/schema034.phpt
@@ -0,0 +1,37 @@
+--TEST--
+SOAP XML Schema 34: Nested complex types (element ref)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <element name="testType2" type="tns:testType2"/>
+ <complexType name="testType2">
+ <sequence>
+ <element name="int" type="int"/>
+ </sequence>
+ </complexType>
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element ref="tns:testType2"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"testType2"=>array("int"=>123.5)));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["testType2"]=>
+ object(stdClass)#%d (1) {
+ ["int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema035.phpt b/ext/soap/tests/schema/schema035.phpt
new file mode 100644
index 0000000..8974ed0
--- /dev/null
+++ b/ext/soap/tests/schema/schema035.phpt
@@ -0,0 +1,38 @@
+--TEST--
+SOAP XML Schema 35: Nested complex types (element ref + anonymous type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <element name="testType2">
+ <complexType>
+ <sequence>
+ <element name="int" type="int"/>
+ </sequence>
+ </complexType>
+ </element>
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element ref="tns:testType2"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"testType2"=>array("int"=>123.5)));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["testType2"]=>
+ object(stdClass)#%d (1) {
+ ["int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema036.phpt b/ext/soap/tests/schema/schema036.phpt
new file mode 100644
index 0000000..9d6dac4
--- /dev/null
+++ b/ext/soap/tests/schema/schema036.phpt
@@ -0,0 +1,37 @@
+--TEST--
+SOAP XML Schema 36: Nested complex types (inline)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="testType2">
+ <complexType>
+ <sequence>
+ <element name="int" type="int"/>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"testType2"=>array("int"=>123.5)));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["testType2"]=>
+ object(stdClass)#%d (1) {
+ ["int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema037.phpt b/ext/soap/tests/schema/schema037.phpt
new file mode 100644
index 0000000..4e59981
--- /dev/null
+++ b/ext/soap/tests/schema/schema037.phpt
@@ -0,0 +1,28 @@
+--TEST--
+SOAP XML Schema 37: Structure with attributes
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="str" type="string"/>
+ </sequence>
+ <attribute name="int" type="int"/>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema038.phpt b/ext/soap/tests/schema/schema038.phpt
new file mode 100644
index 0000000..2d37e89
--- /dev/null
+++ b/ext/soap/tests/schema/schema038.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 38: Structure with attributes (ref)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="str" type="string"/>
+ </sequence>
+ <attribute ref="tns:int"/>
+ </complexType>
+ <attribute name="int" type="int"/>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema039.phpt b/ext/soap/tests/schema/schema039.phpt
new file mode 100644
index 0000000..0b7ef5a
--- /dev/null
+++ b/ext/soap/tests/schema/schema039.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 39: Structure with attributes (attributeGroup)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="str" type="string"/>
+ </sequence>
+ <attributeGroup ref="tns:intGroup"/>
+ </complexType>
+ <attributeGroup name="intGroup">
+ <attribute name="int" type="int"/>
+ </attributeGroup>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema040.phpt b/ext/soap/tests/schema/schema040.phpt
new file mode 100644
index 0000000..f7ddc04
--- /dev/null
+++ b/ext/soap/tests/schema/schema040.phpt
@@ -0,0 +1,32 @@
+--TEST--
+SOAP XML Schema 40: Structure with attributes (inline types)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="str" type="string"/>
+ </sequence>
+ <attribute name="int">
+ <simpleType>
+ <restriction base="int"/>
+ </simpleType>
+ </attribute>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema041.phpt b/ext/soap/tests/schema/schema041.phpt
new file mode 100644
index 0000000..1264cf5
--- /dev/null
+++ b/ext/soap/tests/schema/schema041.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 41: Structure (group)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <group ref="tns:testGroup"/>
+ </complexType>
+ <group name="testGroup">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="str" type="string"/>
+ </sequence>
+ </group>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["str"]=>
+ string(3) "str"
+}
+ok
diff --git a/ext/soap/tests/schema/schema042.phpt b/ext/soap/tests/schema/schema042.phpt
new file mode 100644
index 0000000..a8aa885
--- /dev/null
+++ b/ext/soap/tests/schema/schema042.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 42: Extension of simple type
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <simpleContent>
+ <extension base="int">
+ <attribute name="int" type="int"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["_"]=>
+ int(123)
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema043.phpt b/ext/soap/tests/schema/schema043.phpt
new file mode 100644
index 0000000..08c2996
--- /dev/null
+++ b/ext/soap/tests/schema/schema043.phpt
@@ -0,0 +1,38 @@
+--TEST--
+SOAP XML Schema 43: Extension of simple type (2)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <simpleContent>
+ <extension base="int">
+ <attribute name="int" type="int"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <complexType name="testType">
+ <simpleContent>
+ <extension base="tns:testType2">
+ <attribute name="int2" type="int"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["_"]=>
+ int(123)
+ ["int"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema044.phpt b/ext/soap/tests/schema/schema044.phpt
new file mode 100644
index 0000000..8fc0705
--- /dev/null
+++ b/ext/soap/tests/schema/schema044.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 44: Restriction of simple type
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <simpleContent>
+ <restriction base="int">
+ <attribute name="int" type="int"/>
+ </restriction>
+ </simpleContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["_"]=>
+ int(123)
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema045.phpt b/ext/soap/tests/schema/schema045.phpt
new file mode 100644
index 0000000..346a929
--- /dev/null
+++ b/ext/soap/tests/schema/schema045.phpt
@@ -0,0 +1,36 @@
+--TEST--
+SOAP XML Schema 45: Restriction of simple type (2)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <simpleContent>
+ <extension base="int">
+ <attribute name="int" type="int"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <complexType name="testType">
+ <simpleContent>
+ <restriction base="tns:testType2">
+ <attribute name="int2" type="int"/>
+ </restriction>
+ </simpleContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["_"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema046.phpt b/ext/soap/tests/schema/schema046.phpt
new file mode 100644
index 0000000..3f9d03a
--- /dev/null
+++ b/ext/soap/tests/schema/schema046.phpt
@@ -0,0 +1,38 @@
+--TEST--
+SOAP XML Schema 46: Extension of complex type
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <simpleContent>
+ <extension base="int">
+ <attribute name="int" type="int"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <complexType name="testType">
+ <complexContent>
+ <extension base="tns:testType2">
+ <attribute name="int2" type="int"/>
+ </extension>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["_"]=>
+ int(123)
+ ["int"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema047.phpt b/ext/soap/tests/schema/schema047.phpt
new file mode 100644
index 0000000..1265cfd
--- /dev/null
+++ b/ext/soap/tests/schema/schema047.phpt
@@ -0,0 +1,34 @@
+--TEST--
+SOAP XML Schema 47: Extension of complex type (2)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <sequence>
+ <element name="int" type="int"/>
+ </sequence>
+ </complexType>
+ <complexType name="testType">
+ <complexContent>
+ <extension base="tns:testType2">
+ <attribute name="int2" type="int"/>
+ </extension>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int2="123"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema048.phpt b/ext/soap/tests/schema/schema048.phpt
new file mode 100644
index 0000000..98d4d4b
--- /dev/null
+++ b/ext/soap/tests/schema/schema048.phpt
@@ -0,0 +1,36 @@
+--TEST--
+SOAP XML Schema 48: Restriction of complex type
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <simpleContent>
+ <extension base="int">
+ <attribute name="int" type="int"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="tns:testType2">
+ <attribute name="int2" type="int"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["_"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema049.phpt b/ext/soap/tests/schema/schema049.phpt
new file mode 100644
index 0000000..7268a4b
--- /dev/null
+++ b/ext/soap/tests/schema/schema049.phpt
@@ -0,0 +1,35 @@
+--TEST--
+SOAP XML Schema 49: Restriction of complex type (2)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="int2" type="int"/>
+ </sequence>
+ </complexType>
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="tns:testType2">
+ <sequence>
+ <element name="int2" type="int"/>
+ </sequence>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema050.phpt b/ext/soap/tests/schema/schema050.phpt
new file mode 100644
index 0000000..6c73512
--- /dev/null
+++ b/ext/soap/tests/schema/schema050.phpt
@@ -0,0 +1,28 @@
+--TEST--
+SOAP XML Schema 50: Array in complex type (maxOccurs > 1, one value)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="int2" type="int" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema051.phpt b/ext/soap/tests/schema/schema051.phpt
new file mode 100644
index 0000000..9636399
--- /dev/null
+++ b/ext/soap/tests/schema/schema051.phpt
@@ -0,0 +1,33 @@
+--TEST--
+SOAP XML Schema 51: Array in complex type (maxOccurs > 1, array)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="int2" type="int" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>array(123.5,456.7)));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2><int2 xsi:type="xsd:int">456</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["int2"]=>
+ array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(456)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema052.phpt b/ext/soap/tests/schema/schema052.phpt
new file mode 100644
index 0000000..8e7121a
--- /dev/null
+++ b/ext/soap/tests/schema/schema052.phpt
@@ -0,0 +1,28 @@
+--TEST--
+SOAP XML Schema 52: Array in complex type (maxOccurs > 1, array with one value)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="int2" type="int" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>array(123.5)));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["int"]=>
+ int(123)
+ ["int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema053.phpt b/ext/soap/tests/schema/schema053.phpt
new file mode 100644
index 0000000..8893bf5
--- /dev/null
+++ b/ext/soap/tests/schema/schema053.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SOAP XML Schema 52: Array in complex type (maxOccurs > 1, empty array)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int" type="int"/>
+ <element name="int2" type="int" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>array()));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema054.phpt b/ext/soap/tests/schema/schema054.phpt
new file mode 100644
index 0000000..5adf2f5
--- /dev/null
+++ b/ext/soap/tests/schema/schema054.phpt
@@ -0,0 +1,23 @@
+--TEST--
+SOAP XML Schema 54: Apache Map
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = '';
+test_schema($schema,'type="apache:Map" xmlns:apache="http://xml.apache.org/xml-soap"',array('a'=>123,'b'=>123.5));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns2:Map"><item><key xsi:type="xsd:string">a</key><value xsi:type="xsd:int">123</value></item><item><key xsi:type="xsd:string">b</key><value xsi:type="xsd:float">123.5</value></item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ ["a"]=>
+ int(123)
+ ["b"]=>
+ float(123.5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema055.phpt b/ext/soap/tests/schema/schema055.phpt
new file mode 100644
index 0000000..14dbdb7
--- /dev/null
+++ b/ext/soap/tests/schema/schema055.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 55: Apache Map (extension)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <extension base="apache:Map" xmlns:apache="http://xml.apache.org/xml-soap">
+ </extension>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="testType"',array('a'=>123,'b'=>123.5));
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns2:Map"><item><key xsi:type="xsd:string">a</key><value xsi:type="xsd:int">123</value></item><item><key xsi:type="xsd:string">b</key><value xsi:type="xsd:float">123.5</value></item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ ["a"]=>
+ int(123)
+ ["b"]=>
+ float(123.5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema056.phpt b/ext/soap/tests/schema/schema056.phpt
new file mode 100644
index 0000000..1ada78e
--- /dev/null
+++ b/ext/soap/tests/schema/schema056.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 56: SOAP 1.1 Array (literal encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:test><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema057.phpt b/ext/soap/tests/schema/schema057.phpt
new file mode 100644
index 0000000..1848b9c
--- /dev/null
+++ b/ext/soap/tests/schema/schema057.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 57: SOAP 1.1 Array (second way, literal encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:test><testParam><x_item>123</x_item><x_item>123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema058.phpt b/ext/soap/tests/schema/schema058.phpt
new file mode 100644
index 0000000..b96fc9f
--- /dev/null
+++ b/ext/soap/tests/schema/schema058.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 58: SOAP 1.2 Array (literal encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <attribute ref="enc12:itemType" wsdl:itemType="int"/>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="*"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:test><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema059.phpt b/ext/soap/tests/schema/schema059.phpt
new file mode 100644
index 0000000..875bae9
--- /dev/null
+++ b/ext/soap/tests/schema/schema059.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 59: SOAP 1.2 Array (second way, literal encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:test><testParam><x_item>123</x_item><x_item>123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema060.phpt b/ext/soap/tests/schema/schema060.phpt
new file mode 100644
index 0000000..4daa83c
--- /dev/null
+++ b/ext/soap/tests/schema/schema060.phpt
@@ -0,0 +1,36 @@
+--TEST--
+SOAP XML Schema 60: SOAP 1.2 Multidimensional array (literal encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <attribute ref="enc12:itemType" wsdl:itemType="int"/>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)),'rpc','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:test><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema061.phpt b/ext/soap/tests/schema/schema061.phpt
new file mode 100644
index 0000000..bbd2aa6
--- /dev/null
+++ b/ext/soap/tests/schema/schema061.phpt
@@ -0,0 +1,38 @@
+--TEST--
+SOAP XML Schema 61: SOAP 1.2 Multidimensional array (second way, literal encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)),'rpc','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:test><testParam><x_item>123</x_item><x_item>123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema062.phpt b/ext/soap/tests/schema/schema062.phpt
new file mode 100644
index 0000000..60b0656
--- /dev/null
+++ b/ext/soap/tests/schema/schema062.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 62: NULL with attributes
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <simpleContent>
+ <restriction base="int">
+ <attribute name="int" type="int"/>
+ </restriction>
+ </simpleContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("_"=>NULL,"int"=>123.5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam xsi:nil="true" int="123" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["_"]=>
+ NULL
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema063.phpt b/ext/soap/tests/schema/schema063.phpt
new file mode 100644
index 0000000..7fda578
--- /dev/null
+++ b/ext/soap/tests/schema/schema063.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SOAP XML Schema 63: standard unsignedLong type
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+precision=14
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = '';
+test_schema($schema,'type="xsd:unsignedLong"',0xffffffff);
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="xsd:unsignedLong">4294967295</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+%s(4294967295)
+ok
diff --git a/ext/soap/tests/schema/schema064.phpt b/ext/soap/tests/schema/schema064.phpt
new file mode 100644
index 0000000..899a293
--- /dev/null
+++ b/ext/soap/tests/schema/schema064.phpt
@@ -0,0 +1,61 @@
+--TEST--
+SOAP XML Schema 64: standard date/time types
+--SKIPIF--
+<?php
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+ die('skip, windows has different TZ format');
+}
+require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="dateTime" type="dateTime"/>
+ <element name="time" type="time"/>
+ <element name="date" type="date"/>
+ <element name="gYearMonth" type="gYearMonth"/>
+ <element name="gYear" type="gYear"/>
+ <element name="gMonthDay" type="gMonthDay"/>
+ <element name="gDay" type="gDay"/>
+ <element name="gMonth" type="gMonth"/>
+ </sequence>
+ </complexType>
+EOF;
+$date = gmmktime(1,2,3,4,5,1976);
+putenv('TZ=GMT');
+test_schema($schema,'type="tns:testType"',array(
+ 'dateTime' => $date,
+ 'time' => $date,
+ 'date' => $date,
+ 'gYearMonth' => $date,
+ 'gYear' => $date,
+ 'gMonthDay' => $date,
+ 'gDay' => $date,
+ 'gMonth' => $date
+));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><dateTime xsi:type="xsd:dateTime">1976-04-05T01:02:03Z</dateTime><time xsi:type="xsd:time">01:02:03Z</time><date xsi:type="xsd:date">1976-04-05Z</date><gYearMonth xsi:type="xsd:gYearMonth">1976-04Z</gYearMonth><gYear xsi:type="xsd:gYear">1976Z</gYear><gMonthDay xsi:type="xsd:gMonthDay">--04-05Z</gMonthDay><gDay xsi:type="xsd:gDay">---05Z</gDay><gMonth xsi:type="xsd:gMonth">--04--Z</gMonth></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (8) {
+ ["dateTime"]=>
+ string(20) "1976-04-05T01:02:03Z"
+ ["time"]=>
+ string(9) "01:02:03Z"
+ ["date"]=>
+ string(11) "1976-04-05Z"
+ ["gYearMonth"]=>
+ string(8) "1976-04Z"
+ ["gYear"]=>
+ string(5) "1976Z"
+ ["gMonthDay"]=>
+ string(8) "--04-05Z"
+ ["gDay"]=>
+ string(6) "---05Z"
+ ["gMonth"]=>
+ string(7) "--04--Z"
+}
+ok
diff --git a/ext/soap/tests/schema/schema065.phpt b/ext/soap/tests/schema/schema065.phpt
new file mode 100644
index 0000000..3199a6b
--- /dev/null
+++ b/ext/soap/tests/schema/schema065.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SOAP XML Schema 65: Attribute with default value
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="str" type="string"/>
+ <attribute name="int" type="int" default="5"/>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str"));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema066.phpt b/ext/soap/tests/schema/schema066.phpt
new file mode 100644
index 0000000..7fe47bb
--- /dev/null
+++ b/ext/soap/tests/schema/schema066.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SOAP XML Schema 66: Attribute with fixed value (1)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="str" type="string"/>
+ <attribute name="int" type="int" fixed="5"/>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str"));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema067.phpt b/ext/soap/tests/schema/schema067.phpt
new file mode 100644
index 0000000..5ee0036
--- /dev/null
+++ b/ext/soap/tests/schema/schema067.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SOAP XML Schema 67: Attribute with fixed value (2)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="str" type="string"/>
+ <attribute name="int" type="int" fixed="5"/>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>5));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam str="str" int="5" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema068.phpt b/ext/soap/tests/schema/schema068.phpt
new file mode 100644
index 0000000..88fdac3
--- /dev/null
+++ b/ext/soap/tests/schema/schema068.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SOAP XML Schema 68: Attribute with fixed value (3)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="str" type="string"/>
+ <attribute name="int" type="int" fixed="5"/>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>4));
+echo "ok";
+?>
+--EXPECTF--
+Fatal error: SOAP-ERROR: Encoding: Attribute 'int' has fixed value '5' (value '4' is not allowed) in %stest_schema.inc on line %d \ No newline at end of file
diff --git a/ext/soap/tests/schema/schema069.phpt b/ext/soap/tests/schema/schema069.phpt
new file mode 100644
index 0000000..ccaa342
--- /dev/null
+++ b/ext/soap/tests/schema/schema069.phpt
@@ -0,0 +1,27 @@
+--TEST--
+SOAP XML Schema 69: Attribute with default value (reference)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="str" type="string"/>
+ <attribute ref="tns:int"/>
+ </complexType>
+ <attribute name="int" type="int" default="5"/>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str"));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema070.phpt b/ext/soap/tests/schema/schema070.phpt
new file mode 100644
index 0000000..0c1e249
--- /dev/null
+++ b/ext/soap/tests/schema/schema070.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 70: Attribute with default value (attributeGroup)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="str" type="string"/>
+ <attributeGroup ref="tns:int_group"/>
+ </complexType>
+ <attributeGroup name="int_group">
+ <attribute name="int" type="int" default="5"/>
+ </attributeGroup>
+EOF;
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str"));
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema071.phpt b/ext/soap/tests/schema/schema071.phpt
new file mode 100644
index 0000000..1991f7a
--- /dev/null
+++ b/ext/soap/tests/schema/schema071.phpt
@@ -0,0 +1,23 @@
+--TEST--
+SOAP XML Schema 71: SOAP 1.1 Array (document style)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),'document','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></SOAP-ENV:Body></SOAP-ENV:Envelope>
+ok
diff --git a/ext/soap/tests/schema/schema072.phpt b/ext/soap/tests/schema/schema072.phpt
new file mode 100644
index 0000000..89a0ed3
--- /dev/null
+++ b/ext/soap/tests/schema/schema072.phpt
@@ -0,0 +1,25 @@
+--TEST--
+SOAP XML Schema 72: SOAP 1.1 Array (document style, element with inline type)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <element name="testElement">
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ </element>
+EOF;
+test_schema($schema,'element="tns:testElement"',array(123,123.5),'document','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:testElement><xsd:int>123</xsd:int><xsd:int>123</xsd:int></ns1:testElement></SOAP-ENV:Body></SOAP-ENV:Envelope>
+ok
diff --git a/ext/soap/tests/schema/schema073.phpt b/ext/soap/tests/schema/schema073.phpt
new file mode 100644
index 0000000..22dd9e2
--- /dev/null
+++ b/ext/soap/tests/schema/schema073.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SOAP XML Schema 73: SOAP 1.1 Array (document style, element with type ref)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <element name="testElement" type="tns:testType"/>
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'element="tns:testElement"',array(123,123.5),'document','literal');
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:testElement><xsd:int>123</xsd:int><xsd:int>123</xsd:int></ns1:testElement></SOAP-ENV:Body></SOAP-ENV:Envelope>
+ok
diff --git a/ext/soap/tests/schema/schema074.phpt b/ext/soap/tests/schema/schema074.phpt
new file mode 100644
index 0000000..3dbba0c
--- /dev/null
+++ b/ext/soap/tests/schema/schema074.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 74: Structure with attributes and qualified elements
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="str" type="string"/>
+ </sequence>
+ <attribute name="int" type="int"/>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5), "rpc", "encoded", 'attributeFormDefault="qualified"');
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ ["str"]=>
+ string(3) "str"
+ ["int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema075.phpt b/ext/soap/tests/schema/schema075.phpt
new file mode 100644
index 0000000..5867e55
--- /dev/null
+++ b/ext/soap/tests/schema/schema075.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 75: Attributes form qualified/unqualified (attributeFormDefault="qualified")
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="int1" type="int"/>
+ <attribute name="int2" type="int" form="qualified"/>
+ <attribute name="int3" type="int" form="unqualified"/>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "encoded", 'attributeFormDefault="qualified"');
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam ns1:int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["int1"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+ ["int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema076.phpt b/ext/soap/tests/schema/schema076.phpt
new file mode 100644
index 0000000..3ad2eae
--- /dev/null
+++ b/ext/soap/tests/schema/schema076.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 76: Attributes form qualified/unqualified (attributeFormDefault="unqualified")
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="int1" type="int"/>
+ <attribute name="int2" type="int" form="qualified"/>
+ <attribute name="int3" type="int" form="unqualified"/>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "encoded", 'attributeFormDefault="unqualified"');
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["int1"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+ ["int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema077.phpt b/ext/soap/tests/schema/schema077.phpt
new file mode 100644
index 0000000..16057cf
--- /dev/null
+++ b/ext/soap/tests/schema/schema077.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 77: Attributes form qualified/unqualified (attributeFormDefault - default)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <attribute name="int1" type="int"/>
+ <attribute name="int2" type="int" form="qualified"/>
+ <attribute name="int3" type="int" form="unqualified"/>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "encoded");
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:test><testParam int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["int1"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+ ["int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema078.phpt b/ext/soap/tests/schema/schema078.phpt
new file mode 100644
index 0000000..7636a78
--- /dev/null
+++ b/ext/soap/tests/schema/schema078.phpt
@@ -0,0 +1,32 @@
+--TEST--
+SOAP XML Schema 78: Element form qualified/unqualified (elementFormDefault="qualified")
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int1" type="int"/>
+ <element name="int2" type="int" form="qualified"/>
+ <element name="int3" type="int" form="unqualified"/>
+ </sequence>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal", 'elementFormDefault="qualified"');
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><ns1:int1>1</ns1:int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["int1"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+ ["int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema079.phpt b/ext/soap/tests/schema/schema079.phpt
new file mode 100644
index 0000000..34dcd9b
--- /dev/null
+++ b/ext/soap/tests/schema/schema079.phpt
@@ -0,0 +1,32 @@
+--TEST--
+SOAP XML Schema 79: Element form qualified/unqualified (elementFormDefault="unqualified")
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int1" type="int"/>
+ <element name="int2" type="int" form="qualified"/>
+ <element name="int3" type="int" form="unqualified"/>
+ </sequence>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal", 'elementFormDefault="unqualified"');
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["int1"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+ ["int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema080.phpt b/ext/soap/tests/schema/schema080.phpt
new file mode 100644
index 0000000..7519d6a
--- /dev/null
+++ b/ext/soap/tests/schema/schema080.phpt
@@ -0,0 +1,32 @@
+--TEST--
+SOAP XML Schema 80: Element form qualified/unqualified (elementFormDefault - default)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <sequence>
+ <element name="int1" type="int"/>
+ <element name="int2" type="int" form="qualified"/>
+ <element name="int3" type="int" form="unqualified"/>
+ </sequence>
+ </complexType>
+EOF;
+
+test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal");
+echo "ok";
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ ["int1"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+ ["int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema081.phpt b/ext/soap/tests/schema/schema081.phpt
new file mode 100644
index 0000000..337f081
--- /dev/null
+++ b/ext/soap/tests/schema/schema081.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SOAP XML Schema 81: SOAP 1.1 Array with SOAP_USE_XSI_ARRAY_TYPE
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema082.phpt b/ext/soap/tests/schema/schema082.phpt
new file mode 100644
index 0000000..34c4c76
--- /dev/null
+++ b/ext/soap/tests/schema/schema082.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 82: SOAP 1.1 Array with SOAP_USE_XSI_ARRAY_TYPE (second way)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema083.phpt b/ext/soap/tests/schema/schema083.phpt
new file mode 100644
index 0000000..854c4f9
--- /dev/null
+++ b/ext/soap/tests/schema/schema083.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SOAP XML Schema 83: SOAP 1.2 Array with SOAP_USE_XSI_ARRAY_TYPE
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <attribute ref="enc12:itemType" wsdl:itemType="int"/>
+ <attribute ref="enc12:arraySize" wsdl:arraySize="*"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema084.phpt b/ext/soap/tests/schema/schema084.phpt
new file mode 100644
index 0000000..94a9551
--- /dev/null
+++ b/ext/soap/tests/schema/schema084.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SOAP XML Schema 84: SOAP 1.2 Array with SOAP_USE_XSI_ARRAY_TYPE (second way)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType">
+ <complexContent>
+ <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding">
+ <all>
+ <element name="x_item" type="int" maxOccurs="unbounded"/>
+ </all>
+ </restriction>
+ </complexContent>
+ </complexType>
+EOF;
+test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema085.phpt b/ext/soap/tests/schema/schema085.phpt
new file mode 100644
index 0000000..9a93ac7
--- /dev/null
+++ b/ext/soap/tests/schema/schema085.phpt
@@ -0,0 +1,45 @@
+--TEST--
+SOAP XML Schema 85: Extension of complex type (elements order)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <complexType name="testType2">
+ <sequence>
+ <element name="int" type="int"/>
+ </sequence>
+ </complexType>
+ <complexType name="testType">
+ <complexContent>
+ <extension base="tns:testType2">
+ <sequence>
+ <element name="int2" type="int"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+EOF;
+class A {
+ public $int = 1;
+}
+
+class B extends A {
+ public $int2 = 2;
+}
+
+
+test_schema($schema,'type="tns:testType"',new B());
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">1</int><int2 xsi:type="xsd:int">2</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#5 (2) {
+ ["int"]=>
+ int(1)
+ ["int2"]=>
+ int(2)
+}
+ok
diff --git a/ext/soap/tests/schema/skipif.inc b/ext/soap/tests/schema/skipif.inc
new file mode 100644
index 0000000..8780887
--- /dev/null
+++ b/ext/soap/tests/schema/skipif.inc
@@ -0,0 +1,5 @@
+<?php
+ if (!extension_loaded('soap')) die('skip soap extension not available');
+ /* xml parser is required by test_schema.inc */
+ if (!extension_loaded('xml')) die('skip xml extension not available');
+?>
diff --git a/ext/soap/tests/schema/test_schema.inc b/ext/soap/tests/schema/test_schema.inc
new file mode 100644
index 0000000..bfc4ce0
--- /dev/null
+++ b/ext/soap/tests/schema/test_schema.inc
@@ -0,0 +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;
+ }
+}
+?>