Bugs php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login

go to bug id or search bugs for

Bug #49278 SoapClient::__getLastResponseHeaders returns NULL if wsdl operation !has output
Submitted: 2009年08月17日 10:07 UTC Modified: 2011年02月11日 12:37 UTC
Votes:12
Avg. Score:4.3 ± 0.7
Reproduced:9 of 9 (100.0%)
Same Version:3 (33.3%)
Same OS:5 (55.6%)
From: jeroen at asystance dot nl Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.3.3 OS: linux
Private report: No CVE-ID: None
[2009年08月17日 10:07 UTC] jeroen at asystance dot nl
Description:
------------
For <wsdl:operation>s that do not have output, SoapClient does not return last response headers.
Reproduce code:
---------------
download http://jayvee.nl/soaptest3.tar
change URL in interface.wsdl to point to SOAPtest.php
SOAPtest.php contains both client and server code, so just run
php SOAPtest.php
Expected result:
----------------
SoapClient::getLastResponseHeaders should return string
Actual result:
--------------
SoapClient::getLastResponseHeaders returns NULL

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
[2009年09月19日 20:19 UTC] sjoerd@php.net
Thank you for your bug report.
Apparently, the response is not parsed at all when the method returns nothing. This gives problems with getLastResponseHeaders, as the bug reporter described. Furthermore, if the server returns a HTTP status such as 404 Not Found or 500 Internal Error, the client should does not throw a SoapFault, where it should.
See ext/soap/php_http.c:771.
[2011年02月11日 12:31 UTC] jeroen at asystance dot nl
-PHP Version: 5.3SVN-2009年08月17日 (snap) +PHP Version: 5.3.3
[2011年02月11日 12:31 UTC] jeroen at asystance dot nl
Just wanted to confirm this bug is still present in 5.3.3
[2011年02月11日 12:37 UTC] jeroen at asystance dot nl
Also, if I add 'feature' => SOAP_WAIT_ONE_WAY_CALLS to the options array in the SoapClient constructor, instead of nothing, I get
PHP Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML document
[2016年06月08日 12:21 UTC] vavra at 602 dot cz
I observe this issue, if operation doesn't have any output and also if have output. 
Windows 10 x64, 
PHP 5.6.17 (cli) (built: Jan 6 2016 13:28:25)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
 with Xdebug v2.4.0RC4, Copyright (c) 2002-2016, by Derick Rethans
[2017年11月24日 10:26 UTC] bepeppered at gmail dot com
Is there any fix in future? It also happens on 7.1.11
[2023年11月06日 18:07 UTC] git@php.net
Automatic comment on behalf of nielsdos
Revision: https://github.com/php/php-src/commit/92e4e8bdf4cc0cb2dce022f82b4f7c1f6a8bcd7d
Log: Fix #49278: SoapClient::__getLastResponseHeaders returns NULL if wsdl operation !has output
[2023年11月06日 18:07 UTC] git@php.net
-Status: Verified +Status: Closed
PHP Copyright © 2001-2025 The PHP Group
All rights reserved. Last updated: Sat Oct 18 21:00:01 2025 UTC

AltStyle によって変換されたページ (->オリジナル) /