Bug #69783 [NEW]: Webservice wsdl cache and proxy causes "Could not connect to host" error
| From: | maciej dot lizewski at 3e dot pl | Date: | Tue, 09 Jun 2015 09:28:48 +0000 |
| Subject: | Bug #69783 [NEW]: Webservice wsdl cache and proxy causes "Could not connect to host" error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-193237@lists.php.net to get a copy of this message | ||
From: maciej dot lizewski at 3e dot pl
Operating system: Debian Linux
PHP version: 5.6.9
Package: SOAP related
Bug Type: Bug
Bug description:Webservice wsdl cache and proxy causes "Could not connect to host" error
Description:
------------
We need to connect to SSL WebService through Squid proxy.
When we connect with proxy and without wsdl cache (on disk) - it works
fine
When we connect without proxy and with wsdl cache (on disk) - it works
fine
when we connect with both wsdl cache on disk and proxy - only first
request works (which creates cache file). All subsequent calls fail with
"Could not connect to host" error. When cache file is wiped out - next
request works fine, and again subsequent throw an error.
another thing is that we have to provide proxy configuration in both
SoapClient options and Stream Context. When only provided in one place -
same error is thrown ("Could not connect to host").
Test script:
---------------
$opts = array( 'http'=>array( 'proxy'=>'tcp://[proxy host]:3128'
) );
$context = stream_context_create( $opts );
$client = new SoapClient( 'https://webapi.allegro.pl/service.php?wsdl',
array( 'proxy_host'=>'[proxy host]', 'proxy_port'=>3128,
'cache_wsdl'=>WSDL_CACHE_BOTH, 'stream_context'=>$context ) );
$request = array(
'sysvar' => 1,
'countryId' => 1,
'webapiKey' => '[secret]'
);
try{
var_dump( $client->doQuerySysStatus( $request ) );
}catch(SoapFault $e){
echo $e->getCode() . ' ' . $e->getMessage() . "\n";
}
Expected result:
----------------
WSDL cache should work and it should use cached data when using proxy.
Actual result:
--------------
We can use only wsdl cache or proxy at once. Using both causes
connection errors.
--
Edit bug report at https://bugs.php.net/bug.php?id=69783&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69783&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69783&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69783&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69783&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69783&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69783&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69783&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69783&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69783&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69783&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69783&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69783&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69783&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69783&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69783&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69783&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69783&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69783&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69783&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69783&r=mysqlcfg