]> granicus.if.org Git - php/commitdiff
SoapServer constructor was extended by default SOAP version.
authorDmitry Stogov <dmitry@php.net>
Tue, 3 Feb 2004 16:43:38 +0000 (16:43 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 3 Feb 2004 16:43:38 +0000 (16:43 +0000)
ext/soap/tests/soap12/T24.phpt
ext/soap/tests/soap12/T25.phpt
ext/soap/tests/soap12/T64.phpt [new file with mode: 0644]
ext/soap/tests/soap12/T65.phpt [new file with mode: 0644]
ext/soap/tests/soap12/soap12-test.inc

index ac2f84205e585697062d396265ddc33cd37eb264..ae27bc098da8ab7a9885e5222e36a56379659e5f 100644 (file)
@@ -18,4 +18,4 @@ include "soap12-test.inc";
 ?>
 --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: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><SOAP-ENV:Fault><faultcode>SOAP-ENV:VersionMismatch</faultcode><faultstring>Wrong Version</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><env:Fault><env:Code><env:Value>env:VersionMismatch</env:Value></env:Code><env:Reason><env:Text>Wrong Version</env:Text></env:Reason></env:Fault></env:Body></env:Envelope>
index 894136eb202cc5f3770f0fea55e27ccf41077711..bb1d0c9b131c8bbefaefa2fee7ba99cd27e9e188 100644 (file)
@@ -19,4 +19,4 @@ include "soap12-test.inc";
 ?>
 --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: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><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>DTD are not supported by SOAP</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>DTD are not supported by SOAP</env:Text></env:Reason></env:Fault></env:Body></env:Envelope>
diff --git a/ext/soap/tests/soap12/T64.phpt b/ext/soap/tests/soap12/T64.phpt
new file mode 100644 (file)
index 0000000..0ee3470
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+SOAP 1.2: T64 echoOk
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$HTTP_RAW_POST_DATA = <<<EOF
+<?xml version='1.0' ?>
+<!DOCTYPE DOC [
+<!NOTATION application_xml SYSTEM 'http://www.isi.edu/in-notes/iana/assignments/media-types/application/xml'>
+]>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
+ <env:Body>
+    <test:echoOk xmlns:test="http://example.org/ts-tests">
+      foo
+    </test:echoOk>
+ </env:Body>
+</env:Envelope>
+EOF;
+include "soap12-test.inc";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>DTD are not supported by SOAP</env:Text></env:Reason></env:Fault></env:Body></env:Envelope>
diff --git a/ext/soap/tests/soap12/T65.phpt b/ext/soap/tests/soap12/T65.phpt
new file mode 100644 (file)
index 0000000..ba42ad2
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+SOAP 1.2: T65 echoOk
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$HTTP_RAW_POST_DATA = <<<EOF
+<?xml version='1.0' ?>
+<!DOCTYPE DOC [
+<!ELEMENT Envelope (Body) >
+<!ELEMENT Body (echoOk) >
+<!ELEMENT echoOk (#PCDATA) >
+]>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
+  <env:Body>
+    <test:echoOk xmlns:test="http://example.org/ts-tests">
+      foo
+    </test:echoOk>
+  </env:Body>
+</env:Envelope>
+EOF;
+include "soap12-test.inc";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>DTD are not supported by SOAP</env:Text></env:Reason></env:Fault></env:Body></env:Envelope>
index 1388e00172d40ad31a25ea2e35a2cd8b2598b9c9..b56dd3a32111eccfa2f84beb4128ca58ca06ad61 100644 (file)
@@ -113,7 +113,7 @@ class Soap12test {
        }
 }
 
-$server = new soapserver("http://http://example.org/ts-tests","http://example.org/ts-tests/C");
+$server = new soapserver("http://http://example.org/ts-tests", SOAP_1_2, "http://example.org/ts-tests/C");
 $server->bind(dirname(__FILE__)."/soap12-test.wsdl");
 $server->setClass("Soap12test");