sdlTypePtr type;
type = enc->sdl_type;
+ if (type == NULL) {
+ return guess_zval_convert(enc, data);
+ }
/*FIXME: restriction support
if (type && type->restrictions &&
data && data->children && data->children->content) {
type = enc->sdl_type;
+ if (type == NULL) {
+ ret = guess_xml_convert(enc, data, style, parent);
+ if (style == SOAP_ENCODED) {
+ set_ns_and_type(ret, enc);
+ }
+ return ret;
+ }
/*FIXME: restriction support
if (type) {
if (type->restrictions && Z_TYPE_P(data) == IS_STRING) {
--- /dev/null
+--TEST--
+Bug #29795 (SegFault with Soap and Amazon's Web Services)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+class LocalSoapClient extends SoapClient {
+
+ function LocalSoapClient($wsdl, $options) {
+ $this->SoapClient($wsdl, $options);
+ }
+
+ function __doRequest($request, $location, $action, $version) {
+ return <<<EOF
+<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope>
+EOF;
+ }
+
+}
+
+$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1));
+$ar=$client->GetPrice();
+echo "o";
+$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1));
+$ar=$client->GetPrice();
+echo "k\n";
+?>
+--EXPECT--
+ok
--- /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://xml.amazon.com/AWSProductData/2004-08-01" targetNamespace="http://xml.amazon.com/AWSProductData/2004-08-01">\r
+ <types>\r
+ <xs:schema targetNamespace="http://xml.amazon.com/AWSProductData/2004-08-01" elementFormDefault="qualified">\r
+ <xs:complexType name="Price">\r
+ <xs:sequence>\r
+ <xs:element name="Amount" type="xs:integer" minOccurs="0"/>\r
+ <xs:element name="CurrencyCode" type="xs:string" minOccurs="0"/>\r
+ </xs:sequence>\r
+ </xs:complexType>\r
+ </xs:schema>\r
+ </types>\r
+ <message name="GetPriceRequest">\r
+ </message>\r
+ <message name="GetPriceResponse">\r
+ <part name="Price" type="tns:Price"/>\r
+ </message>\r
+ <portType name="AWSProductDataPortType">\r
+ <operation name="GetPrice">\r
+ <input message="tns:GetPriceRequest"/>\r
+ <output message="tns:GetPriceResponse"/>\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="GetPrice">\r
+ <soap:operation soapAction="http://soap.amazon.com"/>\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