/* deserialize functions */
WSDL_CACHE_GET_INT(num_func, &in);
-<<<<<<< php_sdl.c
- zend_hash_init(&sdl->functions, num_func, NULL, delete_function, 0);
- functions = emalloc(num_func*sizeof(sdlFunctionPtr));
- for (i = 0; i < num_func; i++) {
- int binding_num, num_faults;
- sdlFunctionPtr func = emalloc(sizeof(sdlFunction));
- sdl_deserialize_key(&sdl->functions, func, &in);
- func->functionName = sdl_deserialize_string(&in);
- func->requestName = sdl_deserialize_string(&in);
- func->responseName = sdl_deserialize_string(&in);
-
- WSDL_CACHE_GET_INT(binding_num, &in);
- if (binding_num == 0) {
- func->binding = NULL;
- } else {
- func->binding = bindings[binding_num-1];
- }
- if (func->binding && func->binding->bindingType == BINDING_SOAP && *in != 0) {
- sdlSoapBindingFunctionPtr binding = func->bindingAttributes = emalloc(sizeof(sdlSoapBindingFunction));
- memset(binding, 0, sizeof(sdlSoapBindingFunction));
- WSDL_CACHE_GET_1(binding->style,sdlEncodingStyle,&in);
- binding->soapAction = sdl_deserialize_string(&in);
- sdl_deserialize_soap_body(&binding->input, encoders, types, &in);
- sdl_deserialize_soap_body(&binding->output, encoders, types, &in);
- } else {
- WSDL_CACHE_SKIP(1, &in);
- func->bindingAttributes = NULL;
- }
-=======
if (num_func > 0) {
zend_hash_init(&sdl->functions, num_func, NULL, delete_function, 0);
functions = emalloc(num_func*sizeof(sdlFunctionPtr));
WSDL_CACHE_SKIP(1, &in);
func->bindingAttributes = NULL;
}
->>>>>>> 1.70.2.3
func->requestParameters = sdl_deserialize_parameters(encoders, types, &in);
func->responseParameters = sdl_deserialize_parameters(encoders, types, &in);
struct _sdlAttribute {
char *name;
+ char *namens;
char *ref;
char *def;
char *fixed;
--- /dev/null
+--TEST--
+Bug #29839 incorrect convert (xml:lang to lang)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+function EchoString($s) {
+ return $s;
+}
+
+class LocalSoapClient extends SoapClient {
+
+ function LocalSoapClient($wsdl, $options) {
+ $this->SoapClient($wsdl, $options);
+ $this->server = new SoapServer($wsdl, $options);
+ $this->server->addFunction('EchoString');
+ }
+
+ function __doRequest($request, $location, $action, $version) {
+ ob_start();
+ $this->server->handle($request);
+ $response = ob_get_contents();
+ ob_end_clean();
+ return $response;
+ }
+
+}
+
+$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1));
+$client->EchoString(array("value"=>"hello","lang"=>"en"));
+echo $client->__getLastRequest();
+echo $client->__getLastResponse();
+echo "ok\n";
+?>
+--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"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope>
+ok
\ No newline at end of file
--- /dev/null
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://test-uri" targetNamespace="http://test-uri">\r
+ <types>\r
+ <xs:schema targetNamespace="http://test-uri" elementFormDefault="qualified">\r
+ <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" />\r
+ <complexType name="LocalizedString">\r
+ <sequence>\r
+ <element name="value" type="xsd:string"/>\r
+ </sequence>\r
+ <attribute ref="xml:lang" use="required"/>\r
+ </complexType>\r
+ </xs:schema>\r
+ </types>\r
+ <message name="EchoStringRequest">\r
+ <part name="string" type="tns:LocalizedString"/>\r
+ </message>\r
+ <message name="EchoStringResponse">\r
+ <part name="string" type="tns:LocalizedString"/>\r
+ </message>\r
+ <portType name="AWSProductDataPortType">\r
+ <operation name="EchoString">\r
+ <input message="tns:EchoStringRequest"/>\r
+ <output message="tns:EchoStringResponse"/>\r
+ </operation>\r
+ </portType>\r
+ <binding name="AWSProductDataBinding" type="tns:AWSProductDataPortType">\r
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>\r
+ <operation name="EchoString">\r
+ <soap:operation soapAction="http://test-uri"/>\r
+ <input>\r
+ <soap:body use="literal"/>\r
+ </input>\r
+ <output>\r
+ <soap:body use="literal"/>\r
+ </output>\r
+ </operation>\r
+ </binding>\r
+ <service name="AWSProductData">\r
+ <port name="AWSProductDataPort" binding="tns:AWSProductDataBinding">\r
+ <soap:address location="http://aws-beta.amazon.com/onca/soap?Service=AWSProductData"/>\r
+ </port>\r
+ </service>\r
+</definitions>\r
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:attribute name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>