On 24.07.2009, at 12:45, Davide Romanini wrote:
David Zülke ha scritto:Can do, but I wanted to figure out a way to create a reproduce case first (I already have an idea). - David On 24.07.2009, at 12:20, Dmitry Stogov wrote:Hi David, Please report a bug on bugs.php.net (assign it to dmitry). I'll look into it later. Thanks. Dmitry. David Zülke wrote:This sounds like a serious issue, but I'm not sure if it's in libxml or
[ 8< ]
It's really simple to reproduce. Take this example wsdl: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://mycompany.com/hr/schemas" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://mycompany.com/hr/schemas" targetNamespace="http://mycompany.com/hr/schemas"> <wsdl:types> <xs:schema xmlns:hr="http://mycompany.com/hr/schemas" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://mycompany.com/hr/schemas"> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
[ 8< ]
</wsdl:definitions> The important part is <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> I just copied this file in my local apache doc root and tried to run this script: <?php $client = new SoapClient("http://localhost/test/holiday.wsdl", array( 'trace' => TRUE, 'login'=>'mylogin', 'password'=>'secret' ) ); ?> And the output is:Warning: SoapClient::SoapClient(http://www.w3.org/2001/xml.xsd): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Requiredin /home/romaz/tmp/soapFail.php on line 7Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://www.w3.org/2001/xml.xsd" in /home/romaz/tmp/ soapFail.phpon line 7 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://www.w3.org/2001/xml.xsd' in /home/romaz/tmp/soapFail.php:7 Stack trace: #0 /home/romaz/tmp/soapFail.php(7): SoapClient->SoapClient('http://localhos...', Array) #1 {main} thrown in /home/romaz/tmp/soapFail.php on line 7Note that login and password here are completely useless, because on mylocal apache I haven't any access restriction. Bye, Davide
Yes, thanks, I realize that, but I need to test it in a .phpt unit test, which is a bit trickier. But as I said, I already have an idea. Will do it this later and open a ticket.
- David
Attachment:
smime.p7s
Description: S/MIME cryptographic signature