php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57227 SDO_DAS_XML::create() fails oddly with a URL
Submitted: 2006-09-12 08:03 UTC Modified: 2006-10-30 06:39 UTC
From: mfp@php.net Assigned:
Status: Not a bug Package: SCA_SDO (PECL)
PHP Version: 5.1.4 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 13 = ?
Subscribe to this entry?

 
 [2006-09-12 08:03 UTC] mfp@php.net
Description:
------------
Although the documentation for SDO_DAS_XML does say that the parameter is an xsd file, I rather expected that, in common with many php functions that take a filename, I would be able to pass a URL e.g. http://localhost/MyService/ExchangeRate/ExchangeRateService.wsdl

I had supposed that the URL would be recognised and openwed with a file wrapper that understood http:


In fact I get some only vaguely relevant messages that indicate that the URL was not opened correctly. 



Reproduce code:
---------------
$xmldas = SDO_DAS_XML::create('http://localhost/MyService/ExchangeRate/ExchangeRateService.wsdl');


Expected result:
----------------
the xml das created successfully

Actual result:
--------------
<b>Fatal error</b>:  Uncaught exception 'SDO_DAS_XML_ParserException' with message 'SDO_DAS_XML::create - Unable to parse the supplied xsd file
2 parse error(s) occurred when parsing the file 'http://localhost/MyService/ExchangeRate/ExchangeRateService.wsdl':
1. Document is empty

2. Start tag expected, '<' not found

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-12 10:40 UTC] cem@php.net
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

Works for me:
echo SDO_DAS_XML::create(     'http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd');

gives :
object(SDO_DAS_XML)#1 {
38 types have been defined. The types and their properties are::
1. commonj.sdo:BigDecimal
2. commonj.sdo:BigInteger
3. commonj.sdo:Boolean
4. commonj.sdo:Byte
5. commonj.sdo:Bytes
... and so on

It's actually libxml2 which is loading and parsing your URL.
Does, say, simplexml_load_file() exhibit the same problem with your URL?
 [2006-09-12 12:49 UTC] mfp@php.net
It is stranger than you might think.

It seems that this is related to the size of the file
that is to be fetched.

If you just do 
echo file_get_contents('http://localhost/MyService/AddressBook/in
fo.xsd');
and you mess about with the file size you get somethign very strange: When the file is > 255 bytes and < about
3.5K, what you get is empty. It's not just file_get_contents, of course, but something lower down. 

I am currently on 5.1.4. I need to retest this on 5.1.6 and if still there raise a PHP bug. Either way it is nothing to do with the XML DAS.
 [2006-09-14 07:49 UTC] mfp@php.net
This strange 255/256 byte problem occurs on 5.1.6 so I have raised PHP problem 38826

http://bugs.php.net/bug.php?id=38826
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC