-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOAP Null response if HTTP Status 500 (Soap multipart) #17160
Comments
Actually returning the response instead of null on failure in |
I believe the old behaviour was intentional so this is more of a feature request anyway... |
After further investigation I think I mixed up two different things. The bug and the workaround I tried to fix this. If the response has content-type: text/xml everything works fine and SoapFault is filled with details based on soap:Fault response.
As integrated SoapClient does not support multipart messages, I tried to extract soap content (including soap fault) from response. But due to http status code 500, the response is empty and I cannot extract soap fault.
Any chance to fill $e->detail for multipart responses? |
Filling in the data would require adding multipart support to the http layer of SOAP, something I had started work on some time ago but have yet to finish. |
Description
I've created a soap request with integrated soapclient. As long as the request contains only valid data everything works fine.
But as soon as the request fails, the server returns HTTP Status 500 and __getLastResponse is NULL, even if data is returned. Below you can find the SOAP request and the expected answer based on SOAP UI request
Resulted in this output:
But I expected this output instead (tested with SOAP UI):
Similar problems from other persons:
https://stackoverflow.com/questions/22375590/soapclient-returns-empty-response-on-http-500-error-when-body-is-not-empty
https://stackoverflow.com/questions/43815114/php-soapclient-returning-null-when-server-sends-back-an-error-response
Same behavior with PHP 8.1
PHP Version
PHP 8.3.13
Operating System
Windows Server 2016
The text was updated successfully, but these errors were encountered: