php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64140 SOAPClient returns null without any bug or exception thrown
Submitted: 2013-02-04 13:06 UTC Modified: 2022-12-29 11:26 UTC
Votes:35
Avg. Score:4.5 ± 0.8
Reproduced:31 of 33 (93.9%)
Same Version:17 (54.8%)
Same OS:19 (61.3%)
From: marek dot raida at lmc dot eu Assigned:
Status: Open Package: SOAP related
PHP Version: Irrelevant OS: Linux, Windows
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: marek dot raida at lmc dot eu
New email:
PHP Version: OS:

 

 [2013-02-04 13:06 UTC] marek dot raida at lmc dot eu
Description:
------------
We're calling our internal company service using Soap client. There is WSDL including XSD file and PHP client is able to call method properly and is also getting back proper response and headers, but there is NULL as a result, always, and after couple of hours we still do not have any clue why... Tested on different version of PHP 5.1 - 5.5 alpha, always the same results. Java/Ruby clients behave correctly.

I'm including test script below, which is however depending on WSDL + XSD files and response from internal server.

However, we captured real response and are putting those WSDL publicly with faked real response file, for you to easily try it for yourselves.

http://svg.kvalitne.cz/mix/soap/gis.wsdl
http://svg.kvalitne.cz/mix/soap/gis.xsd
http://svg.kvalitne.cz/mix/soap/response.xml (recorded and stubbed in-place response from real server)


Test script:
---------------
<?php
$wsdl = "http://svg.kvalitne.cz/mix/soap/gis.wsdl";
$client = new SoapClient($wsdl, array('trace' => 1, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE));
$params =  array('acContext' => array('countryIds' => 56, 'language' => 19),
                 'searchString' => "Josefská 505/10, Brno, Brno-město");
try {
   var_dump($client->__soapCall('getAddressOptions', array('parameters' => $params)));
} catch (Exception $e) {
   var_dump($e);
}
echo "\nLast Request: " . $client->__getLastRequest()."\n";
echo "Last Request Headers: " . $client->__getLastRequestHeaders()."\n\n";
echo "Last Response: " . $client->__getLastResponse()."\n";
echo "Last Response Headers: " . $client->__getLastResponseHeaders()."\n";


Expected result:
----------------
have $result, object with parsed response from server

Actual result:
--------------
we are getting NULL but do not know why

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-04 13:10 UTC] marek dot raida at lmc dot eu
Thx for your help, I'm also enclosing captured output of given script run in our environment.

http://svg.kvalitne.cz/mix/soap/real-script-output.txt
 [2016-07-18 13:11 UTC] info at nepda dot eu
With PHP 7.0.8 this is still an issue. W're working with the API from DHL (shipment provider). Since today, the response (header & SOAP body) is fine, but the SoapClient returns NULL. Any progress on this bug?
 [2022-12-29 11:26 UTC] bukka@php.net
Apology for very long delay. It looks that the links no longer work. Would you be able to provide a gist or pastebin of those so it can still be investigated.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 10:01:28 2024 UTC