|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52724 SoapClient() with location param should work with WSDLs with all bad endpoints
Submitted: 2010-08-28 20:25 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: zippy1981 at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 5.3.3 OS: All
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-08-28 20:25 UTC] zippy1981 at gmail dot com
Apologies for the somewhat obtuse title, the character limit made it hard to be 

This is somewhat related to #50698, opened and fixed by me.

If you have a WSDL that only advertises non-HTTP endpoints, or no endpoints at 
all, but you specify a http endpoint the location parameter of the SoapClient() 
constructor, the SoapClient constructor should return successfully. Furthermore, 
it should not attempt to parse the endpoints.

Test script:
#At a testfest now. Test with wsdl will be submitted soon:

Request (SoapClient should handle wsdls with all incompatiable endpoint if you specify and endpoint in the SoapClient() constructor. Edgecase not handled in bug #50698).
Justin Dearing <>
# TestFest 2010 BKTK
<?php require_once(''); ?>
    new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl', Array('location' => ''));
    echo "ok\n";

Expected result:

Actual result:
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 
'/home/zippy/src/testfest/ext/soap/tests/bugs/bug50698_3.wsdl' : failed to load 
external entity "/home/zippy/src/testfest/ext/soap/tests/bugs/bug50698_3.wsdl"
 in /home/zippy/src/testfest/ext/soap/tests/bugs/new.php on line 2
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: 
Couldn't load from '/home/zippy/src/testfest/ext/soap/tests/bugs/bug50698_3.wsdl' 
: failed to load external entity 
 in /home/zippy/src/testfest/ext/soap/tests/bugs/new.php:2
Stack trace:
#0 /home/zippy/src/testfest/ext/soap/tests/bugs/new.php(2): SoapClient-
>SoapClient('/home/zippy/src...', Array)
#1 {main}
  thrown in /home/zippy/src/testfest/ext/soap/tests/bugs/new.php on line 2


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 10:01:28 2024 UTC