php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36460 schemaValidateSource fail when called in a web service method
Submitted: 2006-02-20 13:21 UTC Modified: 2006-02-22 11:34 UTC
From: samuel at zallocco dot net Assigned:
Status: Closed Package: DOM XML related
PHP Version: 5.1.2 OS: Windows XP SP2
Private report: No CVE-ID: None
 [2006-02-20 13:21 UTC] samuel at zallocco dot net
Description:
------------
The DOMDocument::schemaValidateSource function fail with an unspecified error when called in a PEAR:SOAP web service method.
This bug was also posted on news.php.net with this title: "PEAR:SOAP remote invocation of DOMDocument schemaValidateSource function	BUG"

Reproduce code:
---------------
The source code is longer than 20 lines so please dowload from: http://www.scienze.univaq.it/Zallocco.Samuel/pear-soap-test.zip

Expected result:
----------------
Validated: TRUE -> 1

Validated: TRUE -> 1



Actual result:
--------------
Validated: TRUE -> 1

Error: invalid HTTP response




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-20 19:31 UTC] chregu@php.net
I get

Validated: TRUE -> 1 
Validated: TRUE -> 1

(on mac osx)

If you really think, this is a dom fault (the Error suggests otherwise), please provide a simple, non-dependent script. 
Your script is dependent on just too many things to debug... 

It works for me, so it's your turn, to prove that it's DOMs fault (and not one of the PEAR components)

Furthermore, please upgrade to one of the latest libxml2 versions (if not already done), as the XML Schema support has much improved lately

 [2006-02-21 10:39 UTC] samuel at zallocco dot net
If I've posted this message in the wrong category I apologise, but this is the first time I use the error reporting form and I haven't found a best matching category.  I can't submit a non dependent script because I'm sure the DOMDocument->schemaValidateSource works fine in a standard class environment or regular script. But I say that in conjunction with PEAR:SOAP on a MSWindowsXP platform it will cause the error. I've installed the latest version of libxml2 lib but the error will persist.  The next step for me is to migrate all on a linux platform....hoping it will run.
 [2006-02-22 11:27 UTC] samuel at zallocco dot net
I solved the problem simply surrounding the call to schemaValidateSource with this code:
.....
$lixmlps = libxml_use_internal_errors(TRUE);
$_lres = @$dom_model->schemaValidateSource($schema);
$errors = libxml_get_errors();
foreach ($errors as $error)
{
// handle errors here
};
libxml_clear_errors();
libxml_use_internal_errors($lixmlps);
....
I found this slice of code at:
http://www.php.net/manual/en/function.libxml-use-internal-errors.php

THX
BYE
 [2006-02-22 11:34 UTC] samuel at zallocco dot net
....to future memory
The error was caused by libxml, this is the error reported by:
...
foreach ($errors as $error)
{
    echo trim($error->message);
};
....
Error is:
Unimplemented block at ..\xmlschemastypes.c:2145

bye
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC