|  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: Assigned:
Status: Not a bug Package: SCA_SDO (PECL)
PHP Version: 5.1.4 OS: WinXP
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2006-09-12 08:03 UTC]
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-12 10:40 UTC]
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 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(     '');

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]
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
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]
This strange 255/256 byte problem occurs on 5.1.6 so I have raised PHP problem 38826
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 12:01:25 2023 UTC