Return to schema070.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / soap / tests / schema |
1.1 misho 1: --TEST-- 2: SOAP XML Schema 70: Attribute with default value (attributeGroup) 3: --SKIPIF-- 4: <?php require_once('skipif.inc'); ?> 5: --FILE-- 6: <?php 7: include "test_schema.inc"; 8: $schema = <<<EOF 9: <complexType name="testType"> 10: <attribute name="str" type="string"/> 11: <attributeGroup ref="tns:int_group"/> 12: </complexType> 13: <attributeGroup name="int_group"> 14: <attribute name="int" type="int" default="5"/> 15: </attributeGroup> 16: EOF; 17: test_schema($schema,'type="tns:testType"',(object)array("str"=>"str")); 18: echo "ok"; 19: ?> 20: --EXPECTF-- 21: <?xml version="1.0" encoding="UTF-8"?> 22: <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> 23: object(stdClass)#%d (2) { 24: ["str"]=> 25: string(3) "str" 26: ["int"]=> 27: int(5) 28: } 29: ok