php.net |  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: -
Votes:1
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
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: zippy1981 at gmail dot com
New email:
PHP Version: OS:

 

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

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:


--TEST--
Request (SoapClient should handle wsdls with all incompatiable endpoint if you specify and endpoint in the SoapClient() constructor. Edgecase not handled in bug #50698).
--CREDITS--
Justin Dearing <zippy1981@gmail.com>
# TestFest 2010 BKTK
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
soap.wsdl_cache_enabled=0
--FILE--
<?php
    new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl', Array('location' => 'http://127.0.0.1/foo.php'));
    echo "ok\n";
?>
--EXPECT--
ok


Expected result:
----------------
ok

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 
"/home/zippy/src/testfest/ext/soap/tests/bugs/bug50698_3.wsdl"
 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

Patches

Pull Requests

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 03:01:28 2025 UTC