php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50298 SOAP response object returned from SoapClient call not fully populated
Submitted: 2009-11-25 20:43 UTC Modified: 2009-12-06 19:34 UTC
Votes:7
Avg. Score:4.9 ± 0.3
Reproduced:6 of 7 (85.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jassenm at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 5.2.11 OS: Windows Server 2008
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-11-25 20:43 UTC] jassenm at gmail dot com
Description:
------------
SOAP response object returned from PHP5 SoapClient call contains only one element of request. The actual SOAP Response received passes XML validation via firefox browser.

Note: Operating system is Windows Server 2008, but web server is running Apache.



Reproduce code:
---------------
$serverpath =http://services.eventinventory.com/webservices/ticketsearch.asmx?WSDL

$soapclient = new SoapClient($serverpath, array("trace" => 1));
$param = array( "SecurityToken" => "$securitytoken", "ProductionID" => "882731", "MaximumPrice" => "");

print_r($param);

try
{

  $result = $soapclient->SearchTickets($param);

  $soapclient->__getLastResponseHeaders():

  $soapclient->__getLastResponse():
  var_dump($result); :

  print_r($result->SearchTicketsResult);

...
..

Expected result:
----------------
Expect the $result to be populated with the two rows of data received in the SOAP response after "</METHODINFO>", beginning with "<DATA>" . I need the data within "<row>...</row>"

Actual result:
--------------
$result is only populated with the data received between the "<SearchTicketsResult>" and the "</METHODINFO>".  two rows of data received in the SOAP response 
$soapclient->__getLastResponseHeaders():
HTTP/1.1 200 OK Date: Wed, 25 Nov 2009 20:31:51 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 1145

$soapclient->__getLastResponse():
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><SearchTicketsResponse xmlns="http://www.eventinventory.com/webservices/"><SearchTicketsResult><ROOT xmlns=""><METHODINFO><channelName>TicketSearch</channelName><methodName>SearchTickets</methodName><parameters>SecurityToken=ABCDEFG&amp;ProductionID=882731&amp;MaximumPrice=</parameters><processTime type="milliseconds">11.7487</processTime></METHODINFO><DATA xmlns:sql="urn:schemas-microsoft-com:xml-sql"><row TicketID="38481612" Available="2" EventDate="2010-01-18T11:00:00" SeatSection="Lower 20" SeatRow="V" SeatFrom="" SeatThru="" SeatDescription="In Hand" TicketPrice="300" BrokerPrice="0" BrokerID="0" /><row TicketID="36689402" Available="6" EventDate="2010-01-18T11:00:00" SeatSection="Upper Level" SeatRow="N/A" SeatFrom="" SeatThru="" SeatDescription="" TicketPrice="198" BrokerPrice="0" BrokerID="0" /></DATA></ROOT></SearchTicketsResult></SearchTicketsResponse></soap:Body></soap:Envelope>

var_dump($result); :
object(stdClass)#4 (1) { ["SearchTicketsResult"]=> object(stdClass)#5 (1) { ["any"]=> string(756) "TicketSearchSearchTicketsSecurityToken=ABCDEFG&ProductionID=882731&MaximumPrice=11.7487" } }

$result->SearchTicketsResult
stdClass Object ( [any] => TicketSearchSearchTicketsSecurityToken=ABCDEFG&ProductionID=882731&MaximumPrice=11.7487 ) 



Request
====================
POST /webservices/ticketsearch.asmx HTTP/1.1 Host: services.eventinventory.com Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.11 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://www.eventinventory.com/webservices/SearchTickets" Content-Length: 414

<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.eventinventory.com/webservices/"><SOAP-ENV:Body><ns1:SearchTickets><ns1:SecurityToken>ABCDEFG</ns1:SecurityToken><ns1:ProductionID>882731</ns1:ProductionID><ns1:MaximumPrice></ns1:MaximumPrice></ns1:SearchTickets></SOAP-ENV:Body></SOAP-ENV:Envelope> 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-06 16:00 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-12-06 19:32 UTC] jassenm at gmail dot com
I've upgraded to 5.2.12RC4-dev. Issue remains:
 [2009-12-06 19:34 UTC] jassenm at gmail dot com
POST /webservices/ticketsearch.asmx HTTP/1.1 Host: services.eventinventory.com Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.12RC4-dev Content-Type: text/xml; charset=utf-8 SOAPAction: "http://www.eventinventory.com/webservices/SearchTickets" Content-Length: 377
...
object(stdClass)#4 (1) { ["SearchTicketsResult"]=> object(stdClass)#5 (1) { ["any"]=> string(756) "TicketSearchSearchTicketsSecurityToken=ABCDEFG&ProductionID=882731&MaximumPrice=15.2606" } }
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 10:01:23 2020 UTC