php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57180 Problem finding SOAP-ENC type
Submitted: 2006-08-14 07:13 UTC Modified: 2007-04-25 19:47 UTC
From: webserviceclienttester at googlemail dot com Assigned: tuscany (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.3 OS: Windows
Private report: No CVE-ID: None
 [2006-08-14 07:13 UTC] webserviceclienttester at googlemail dot com
Description:
------------
I get the following error when creating an xmldas using the UrbanDictionary wsdl: http://api.urbandictionary.com/soap?wsdl:

<b>Fatal error</b>:  Uncaught exception 'SDO_TypeNotFoundException' with message 'Type not found :http://schemas.xmlsoap.org/soap/encoding/ Array' in C:\SWGAB\PHP\PHPunzipped\PEAR\SCA\SDO_TypeHandler.php:87




Reproduce code:
---------------
$wsdl 	= file_get_contents("http://api.urbandictionary.com/soap?wsdl");

file_put_contents("service.wsdl",$wsdl); 

$xmldas = SDO_DAS_XML::create("service.wsdl");

Expected result:
----------------
Creation of the xmldas should be successful

Actual result:
--------------


<br />
<b>Fatal error</b>:  Uncaught exception 'SDO_TypeNotFoundException' with message 'Type not found :http://schemas.xmlsoap.org/soap/encoding/ Array' in C:\Program Files\Apache\Apache2\htdocs\MyService\component\UrbanDictionary\slangClientxmldas.php:15
Stack trace:
#0 C:\Program Files\Apache\Apache2\htdocs\MyService\component\UrbanDictionary\slangClientxmldas.php(15): SDO_DAS_XML::create('service.wsdl')
#1 C:\Program Files\Zend\ZendStudio-5.2.0\bin\php5\dummy.php(1): include('C:\Program File...')
#2 {main}
  thrown in <b>C:\Program Files\Apache\Apache2\htdocs\MyService\component\UrbanDictionary\slangClientxmldas.php</b> on line <b>15</b><br />


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-15 07:34 UTC] cem@php.net
OK, I can reproduce that
 [2006-08-16 09:41 UTC] cem@php.net
The WSDL you're using is perhaps a bit defective, since it omits the schemaLocation attribute from its import for the SOAP-ENC namespace:
  
  <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />

You can fix this up by hand by adding a schemaLocation attribute to the import, but I realise this may not be a practical solution.

The rules for the import are:
  "if <the schemaLocation> attribute is missing, the validator might expect to get the information from the application, or try to find it on the Internet".

This is in the Tuscany code, so I've raised an issue (http://issues.apache.org/jira/browse/TUSCANY-625) asking them to look more kindly on this wsdl, and attempt to find the schema using the namespace URI before failing.
 [2006-08-21 08:01 UTC] mfp@php.net
For info,
we tried one fix where we always go and look on the web when  only the namespace is specified, but this tripped up loading the wsdl and soap xsds, since the soap xsd contains just such an import for the wsdl xsd, but since the wsdl xsd has always been loaded first, going off and hunting for it is not desired, and even worse, the wsdl xsd disappeared fro its location on the web for a while last Friday and the code just stopped working. Something where we only go looking out on the web as last resort, or we put it under the control of the user (as the W3C description of the process of loading suggests), is needed.
 [2006-09-07 06:34 UTC] cem@php.net
http://issues.apache.org/jira/browse/TUSCANY-625 is open for this
 [2007-04-25 19:47 UTC] cem@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Fix will be in the next release, RSN.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed May 22 08:01:26 2019 UTC