forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
140 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--TEST-- | ||
Bug #42326 (SoapServer crash) | ||
--SKIPIF-- | ||
<?php require_once('skipif.inc'); ?> | ||
--INI-- | ||
soap.wsdl_cache_enabled=0 | ||
--FILE-- | ||
<?php | ||
$request = <<<EOF | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.com/"><SOAP-ENV:Body><ns1:GetProductsRequest><time></time></ns1:GetProductsRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> | ||
EOF; | ||
|
||
|
||
$soap_admin_classmap = array('productDetailsType' => 'SOAP_productDetailsType', | ||
'GetProductsRequest' => 'SOAP_GetProductsRequest', | ||
'GetProductsResponse' => 'SOAP_GetProductsResponse'); | ||
|
||
class SOAP_productDetailsType { | ||
public $id = 0; | ||
} | ||
|
||
class SOAP_GetProductsRequest { | ||
public $time = ''; | ||
} | ||
|
||
class SOAP_GetProductsResponse { | ||
public $products; | ||
function __construct(){ | ||
$this->products = new SOAP_productDetailsType(); | ||
|
||
} | ||
} | ||
|
||
class SOAP_Admin { | ||
public function GetProducts($time){ | ||
return new SOAP_GetProductsResponse(); | ||
} | ||
} | ||
|
||
$soap = new SoapServer(dirname(__FILE__).'/bug42326.wsdl', array('classmap' => $soap_admin_classmap)); | ||
$soap->setClass('SOAP_Admin'); | ||
ob_start(); | ||
$soap->handle($request); | ||
ob_end_clean(); | ||
echo "ok\n"; | ||
?> | ||
--EXPECT-- | ||
ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0"?> | ||
<wsdl:definitions name="OSCAdmin.wsdl" | ||
targetNamespace="http://www.example.com/" | ||
xmlns:tns="http://www.example.com/" | ||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> | ||
<wsdl:types> | ||
|
||
<xsd:schema targetNamespace="http://www.example.com/" | ||
xmlns="http://www.w3.org/2000/10/XMLSchema"> | ||
<xsd:element name="productDetailsType"> | ||
<xsd:complexType> | ||
<xsd:all> | ||
<xsd:element name="id" type="xsd:integer"/> | ||
|
||
</xsd:all> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
|
||
|
||
<xsd:schema targetNamespace="http://www.example.com/" | ||
xmlns="http://www.w3.org/2000/10/XMLSchema"> | ||
<xsd:element name="GetProductsRequest"> | ||
<xsd:complexType> | ||
<xsd:all> | ||
<xsd:element name="time" type="xsd:string"/> | ||
</xsd:all> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
|
||
<xsd:schema targetNamespace="http://www.example.com/" | ||
xmlns="http://www.w3.org/2000/10/XMLSchema"> | ||
<xsd:element name="GetProductsResponse"> | ||
<xsd:complexType> | ||
<xsd:all> | ||
<xsd:element name="products" type="tns:productDetailsType"/> | ||
</xsd:all> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
|
||
|
||
</wsdl:types> | ||
|
||
<wsdl:message name="GetProductsRequest"> | ||
<wsdl:part name="in" element="tns:GetProductsRequest"/> | ||
</wsdl:message> | ||
|
||
<wsdl:message name="GetProductsResponse"> | ||
<wsdl:part name="out" element="tns:GetProductsResponse"/> | ||
</wsdl:message> | ||
|
||
<wsdl:portType name="OSCAdminPortType"> | ||
<wsdl:operation name="GetProducts"> | ||
<wsdl:input message="tns:GetProductsRequest"/> | ||
<wsdl:output message="tns:GetProductsResponse"/> | ||
</wsdl:operation> | ||
</wsdl:portType> | ||
|
||
<wsdl:binding name="OSCAdminSoapBinding" type="tns:OSCAdminPortType"> | ||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> | ||
<wsdl:operation name="GetProducts"> | ||
<soap:operation soapAction=""/> | ||
<wsdl:input name="in"> | ||
<soap:body use="literal"/> | ||
</wsdl:input> | ||
<wsdl:output name="out"> | ||
<soap:body use="literal"/> | ||
</wsdl:output> | ||
</wsdl:operation> | ||
</wsdl:binding> | ||
|
||
<wsdl:service name="OSCAdminService"> | ||
<wsdl:port name="OSCAdminPort" binding="tns:OSCAdminSoapBinding"> | ||
<soap:address location="test://"/> | ||
</wsdl:port> | ||
</wsdl:service> | ||
|
||
</wsdl:definitions> |