]> granicus.if.org Git - php/commitdiff
Some tests where fixed
authorDmitry Stogov <dmitry@php.net>
Wed, 20 Apr 2005 06:35:29 +0000 (06:35 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 20 Apr 2005 06:35:29 +0000 (06:35 +0000)
ext/soap/tests/bugs/bug29236.phpt
ext/soap/tests/classmap.wsdl
ext/soap/tests/schema/schema074.phpt [new file with mode: 0644]

index 372449fbb267bbb90b72aad1af53b82a7d7a4bc6..4dbc302c171cea44c005aa16cbadeb61e27b1ba9 100644 (file)
@@ -3,7 +3,7 @@ Bug #29236 (memory error when wsdl-cache is enabled)
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
 --FILE--
-<?
+<?php
 $client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl");
 var_dump($client->__getFunctions()); 
 ?>
@@ -17,4 +17,4 @@ array(4) {
   string(41) "LogoutResponse Logout(Logout $parameters)"
   [3]=>
   string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)"
-}
\ No newline at end of file
+}
index 25062630ac39cdef8e50705b7146a81d6f411f70..7fcf596244fea38402733ab2f527fb72ed4a0c07 100644 (file)
@@ -1,60 +1,60 @@
-<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.nothing.com" targetNamespace="http://schemas.nothing.com">\r
-       <wsdl:types>\r
-               <xsd:schema targetNamespace="http://schemas.nothing.com">\r
-                       <xsd:complexType name="book">\r
-                               <xsd:all>\r
-                                       <xsd:element name="a" type="xsd:string"/>\r
-                                       <xsd:element name="b" type="xsd:string"/>\r
-                               </xsd:all>\r
-                       </xsd:complexType>\r
-  </xsd:schema>\r
-       </wsdl:types>\r
-       <message name="dotestRequest">\r
-               <part name="dotestReturn" type="tns:book"/>\r
-  </message>\r
-       <message name="dotestResponse">\r
-               <part name="res" type="xsi:string"/>\r
-  </message>\r
-       <message name="dotest2Request">\r
-               <part name="dotest2" type="xsi:string"/>\r
-  </message>\r
-       <message name="dotest2Response">\r
-               <part name="res" type="tns:book"/>\r
-  </message>\r
-       <portType name="testPortType">\r
-               <operation name="dotest">\r
-                       <input message="tns:dotestRequest"/>\r
-                       <output message="tns:dotestResponse"/>\r
-               </operation>\r
-               <operation name="dotest2">\r
-                       <input message="tns:dotest2Request"/>\r
-                       <output message="tns:dotest2Response"/>\r
-               </operation>\r
-       </portType>\r
-       <binding name="testBinding" type="tns:testPortType">\r
-               <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>\r
-               <operation name="dotest">\r
-                       <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest" style="rpc"/>\r
-                       <input>\r
-                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>\r
-                       </input>\r
-                       <output>\r
-                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>\r
-                       </output>\r
-               </operation>\r
-               <operation name="dotest2">\r
-                       <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest2" style="rpc"/>\r
-                       <input>\r
-                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>\r
-                       </input>\r
-                       <output>\r
-                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>\r
-                       </output>\r
-               </operation>\r
-       </binding>\r
-       <service name="test">\r
-               <port name="testPort" binding="tns:testBinding">\r
-                       <soap:address location="http://localhost:81/test/interface.php?class=test"/>\r
-               </port>\r
-       </service>\r
-</wsdl:definitions>\r
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.nothing.com" targetNamespace="http://schemas.nothing.com">
+       <wsdl:types>
+               <xsd:schema targetNamespace="http://schemas.nothing.com">
+                       <xsd:complexType name="book">
+                               <xsd:all>
+                                       <xsd:element name="a" type="xsd:string"/>
+                                       <xsd:element name="b" type="xsd:string"/>
+                               </xsd:all>
+                       </xsd:complexType>
+  </xsd:schema>
+       </wsdl:types>
+       <message name="dotestRequest">
+               <part name="dotestReturn" type="tns:book"/>
+  </message>
+       <message name="dotestResponse">
+               <part name="res" type="xsi:string"/>
+  </message>
+       <message name="dotest2Request">
+               <part name="dotest2" type="xsi:string"/>
+  </message>
+       <message name="dotest2Response">
+               <part name="res" type="tns:book"/>
+  </message>
+       <portType name="testPortType">
+               <operation name="dotest">
+                       <input message="tns:dotestRequest"/>
+                       <output message="tns:dotestResponse"/>
+               </operation>
+               <operation name="dotest2">
+                       <input message="tns:dotest2Request"/>
+                       <output message="tns:dotest2Response"/>
+               </operation>
+       </portType>
+       <binding name="testBinding" type="tns:testPortType">
+               <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+               <operation name="dotest">
+                       <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest" style="rpc"/>
+                       <input>
+                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>
+                       </input>
+                       <output>
+                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>
+                       </output>
+               </operation>
+               <operation name="dotest2">
+                       <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest2" style="rpc"/>
+                       <input>
+                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>
+                       </input>
+                       <output>
+                               <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/>
+                       </output>
+               </operation>
+       </binding>
+       <service name="test">
+               <port name="testPort" binding="tns:testBinding">
+                       <soap:address location="http://localhost:81/test/interface.php?class=test"/>
+               </port>
+       </service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/schema/schema074.phpt b/ext/soap/tests/schema/schema074.phpt
new file mode 100644 (file)
index 0000000..3dbba0c
--- /dev/null
@@ -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