-<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>
--- /dev/null
+--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