php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70462 SOAP call with one_way=1 always returns "SoapClient::__doRequest() returned no"
Submitted: 2015-09-08 12:22 UTC Modified: 2024-09-20 19:35 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: galaevnik at yandex dot ru Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.6.13 OS: Win7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: galaevnik at yandex dot ru
New email:
PHP Version: OS:

 

 [2015-09-08 12:22 UTC] galaevnik at yandex dot ru
Description:
------------
PHP 5.3 && 5.6.7 && actual 5.6+
If we call SoapClient::__doRequest() with $one_way = 1 we always have same error:
SoapClient::__doRequest() returned non string value
But when we calling one-way request we didn't expect to get response at all, and yes, this is non-string value. Code below shows, than there is no checks on this var in __doRequest at all:
https://github.com/php/php-src/blob/master/ext/soap/soap.c:2602

Test script:
---------------
https://github.com/php/php-src/blob/master/ext/soap/soap.c:2602
} else if (Z_TYPE_P(response) != IS_STRING) {
			if (EG(exception) && instanceof_function(EG(exception)->ce, zend_ce_error)) {
				zval rv;
				zend_string *msg;
				zval exception_object;

				ZVAL_OBJ(&exception_object, EG(exception));
				msg = zval_get_string(zend_read_property(zend_ce_error, &exception_object, "message", sizeof("message")-1, 0, &rv));
				/* change class */
				EG(exception)->ce = soap_fault_class_entry;
				set_soap_fault(&exception_object, NULL, "Client", ZSTR_VAL(msg), NULL, NULL, NULL);
				zend_string_release(msg);
			} else if ((fault = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault")-1)) == NULL) {
				add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL);
			}
			ret = FALSE;
		}

Expected result:
----------------
If we call one-way SOAP query we didn't expect on response at all, so i expected to see null or false, but not critical error.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2024-09-20 19:35 UTC] nielsdos@php.net
-Status: Open +Status: No Feedback
 [2024-09-20 19:35 UTC] nielsdos@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

This would mean that make_http_soap_request() returns FALSE.
I tried reproducing this but I can't, if you still experience this please open a report at https://github.com/php/php-src
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC