php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53293 WSDL error when schemaLocation includes port number
Submitted: 2010-11-11 04:35 UTC Modified: 2010-11-26 03:54 UTC
Votes:11
Avg. Score:4.7 ± 0.6
Reproduced:8 of 10 (80.0%)
Same Version:5 (62.5%)
Same OS:3 (37.5%)
From: dpholden at gmail dot com Assigned:
Status: Open Package: XML related
PHP Version: 5.3SVN-2010-11-11 (snap) OS: Windows 7
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-11-11 04:35 UTC] dpholden at gmail dot com
Description:
------------
When trying to parse a WSDL document using SoapClient and the WSDL document contains <imports> or <includes> and the schemaLocation includes a port number (ie. :80) it fails and produces a Soap Fault.

Test script:
---------------
$client = new SoapClient('http://supplier.readyrooms.com.au:80/readyrooms/supplierAPI?WSDL', array('trace' => 1));

print_r($client->__getFunctions());

Expected result:
----------------
A list of functions related to the WSDL.

Actual result:
--------------
SOAP_FAULT: Code: WSDL
Error: SOAP-ERROR: Parsing Schema: can't import schema from 'http://supplier.readyrooms.com.au:80/readyrooms/supplierAPI?xsd=15'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-11 04:37 UTC] dpholden at gmail dot com
<xs:schema>
<xs:import namespace="http://www.jtg.com.au/qh/supplierAPI" schemaLocation="http://supplier.readyrooms.com.au:80/readyrooms/supplierAPI?xsd=15"/>
</xs:schema>

The above is where in the WSDL that it appears to fail parsing
 [2010-11-25 22:27 UTC] iliaa@php.net
-Status: Open +Status: Feedback
 [2010-11-25 22:27 UTC] iliaa@php.net
Seems to work fine here.

The only error I am seeing is:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: 
unresolved element 'ref' attribute
 [2010-11-26 03:52 UTC] dpholden at gmail dot com
-Status: Feedback +Status: Open
 [2010-11-26 03:52 UTC] dpholden at gmail dot com
I've just tried this again, using the same code I've posted here and only that and it is still giving me the same error.

iliaa, what version of PHP are you using and which environment?

I am using WAMP server, PHP Version 5.3.0

soap
Soap Client 	enabled
Soap Server 	enabled

Directive	         Local Value	Master Value
soap.wsdl_cache	              1	              1
soap.wsdl_cache_dir	     /tmp	    /tmp
soap.wsdl_cache_enabled	      1	              1
soap.wsdl_cache_limit	      5	              5
soap.wsdl_cache_ttl	     86400	    86400

And in case it is relevant my SimpleXML version.

Simplexml support	enabled
Revision 	        $Revision: 1.151.2.22.2.35.2.32 $
Schema support 	        enabled
 [2010-11-26 03:54 UTC] dpholden at gmail dot com
Ok I've just run the same script on a Linux server

PHP Version 5.1.6
Apache/2.2.3 (Red Hat) 

SimpleXML revisions differ

WAMP
Revision 	$Revision: 1.151.2.22 $ 

Linux
Revision 	$Revision: 1.151.2.22.2.35.2.32 $ 

On the linux version, I am getting the same result as you iliaa:

Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC