diff --git a/VERSIONS_HOTLINE/182635 b/VERSIONS_HOTLINE/182635 new file mode 100644 index 0000000000000000000000000000000000000000..b1e21cc28eb870aeb1bb513844c196bf359651f3 --- /dev/null +++ b/VERSIONS_HOTLINE/182635 @@ -0,0 +1 @@ + - correctif #182635 : Orphée : Amélioration des informations de diagnostic pour les appels webservices Orphée \ No newline at end of file diff --git a/library/Class/WebService/MappedSoapClient.php b/library/Class/WebService/MappedSoapClient.php index d92898deb1c2a313c339e80f36ece4f7fb6576af..8a85dd07df1ba44382bfb413228cd775b26ca49a 100644 --- a/library/Class/WebService/MappedSoapClient.php +++ b/library/Class/WebService/MappedSoapClient.php @@ -141,6 +141,11 @@ class Class_WebService_MappedSoapClient extends SoapClient { throw $e; } } + + + public function __getLastResponse() :string { + return $this->__last_response ?? parent::__getLastResponse() ?? ''; + } } ?> diff --git a/tests/library/Class/WebService/MappedSoapClientTest.php b/tests/library/Class/WebService/MappedSoapClientTest.php index 23a57fc011563026925b985a6491a5611426b017..563520230753158e5858fb9f165d21b7769a947e 100644 --- a/tests/library/Class/WebService/MappedSoapClientTest.php +++ b/tests/library/Class/WebService/MappedSoapClientTest.php @@ -80,6 +80,13 @@ class MappedSoapClientWithoutErrorTest extends MappedSoapClientTestCase { $this->_soap_client->testing(); $this->assertTrue($this->_logger->methodHasBeenCalled('logSoap')); } + + + /** @test */ + public function getLastResponseShouldBeResponse() { + $this->_soap_client->testing(); + $this->assertEquals($this->_response, $this->_soap_client->__getLastResponse()); + } }