Re: RES: [SOAP] SOAP-ERROR: Couldn't Load from external entity (Whereendpoint resolves to another location)
[email protected] (Matt Kynx) Mon, 1 Jul 2013 19:25:16 +0100
| Newsgroups | php.soap |
|---|---|
| Message-ID | <[email protected]> |
Is the name of the imported wsdl really the same as the wsdl file that's imp= orting it, like in your example? Have you tried copying the file and import down locally and trying from ther= e? Failing that, can you point to a (simplified, anonymised) wsdl that repro= duces the problem? Fwiw, I think the interop guidelines discourage the use of imports, but if i= t's not your wsdl there won't be much you can do about that... Matt Sent from the thing in my pocket On 1 Jul 2013, at 02:31, fruitmixer <[email protected]> wrote: > Sorry that does not help. >=20 > To iterate, when instantiating the client: >=20 > $wsdl =3D 'https://provider.web-service.domain/path/ServiceName?wsdl'; > $client =3D new SoapClient($wsdl); >=20 > I get the following error: >=20 > PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://pr= ovider.web-service.domain/path/ServiceName.wsdl' :failed to load external en= tity "https://provider.web-service.domain/path/ServiceName.wsdl" >=20 >=20 > - superspace >=20 >=20 >=20 > On 28/06/13 21:35, Gerson Czelusniak Junior wrote: >> Hi, >>=20 >> When i call SOAP WebService created with .NET APP using SoapClient PHP th= e code stay like this: >>=20 >> ini_set('display_errors', true); >> ini_set("soap.wsdl_cache_enabled", "0"); >> error_reporting(E_ALL); >> $url =3D "servidor/WebService.asmx?WSDL"; >> $soap =3D new soapClient($url, array('encoding'=3D>'UTF-8')); >> $param =3D $_POST['param']; >> $return =3D $soap->MethodFromWebService(array("param" =3D> $param= )); >> Maybe that can help you. >>=20 >> -----Mensagem original----- >> De: superpspace [mailto:[email protected]] >> Enviada em: quinta-feira, 27 de junho de 2013 21:57 >> Para: [email protected] >> Assunto: RES: [SOAP] SOAP-ERROR: Couldn't Load from external entity (Wher= e endpoint resolves to another location) >>=20 >> 1. I believe the webservice is a .NET APP. >> 2. When requesting the WSDL from the browser I can see the XML. >> But since the XML is not trying to import the secondary WSDL, there is no= errors/issues. >>=20 >> "Gerson Czelusniak Junior" wrote in message news:80940D84E43C0C45AA2C4A9= [email protected]... >>=20 >> Good Morning, >>=20 >> Your webservice is in .NET APP or in PHP? >> When you call the WSDL from Browser you can see the xml? >>=20 >>=20 >> -----Mensagem original----- >> De: superpspace [mailto:[email protected]] Enviada em: ter=C3=A7a-fe= ira, 25 de junho de 2013 22:23 >> Para: [email protected] >> Assunto: [SOAP] SOAP-ERROR: Couldn't Load from external entity (Where end= point resolves to another location) >>=20 >> Hello everyone, >>=20 >> I have a WSDL in the following URL format (obscured): >>=20 >> https://provider.web-service.domain/path/ServiceName?wsdl >>=20 >> that resolves to: >>=20 >> https://provider.web-service.domain/path/ServiceName/another/diff/pat= h/prefix_ServiceName.wsdl >>=20 >> The WSDL has a line like this: >>=20 >> <wsdl:import namespace=3D"http://name/space/service/" >> location=3D"ServiceName.wsdl"></wsdl:import> >>=20 >> When loading the former URL into SoapClient, it complains like so: >>=20 >> PHP Fatal error: SOAP-ERROR: Parsing WSDL: >> Couldn't load from >> 'https://provider.web-service.domain/path/ServiceName.wsdl' : >> failed to load external entity >> "https://provider.web-service.domain/path/ServiceName.wsdl" >>=20 >> The reason i believe this happens is because it's trying to look for Serv= iceName.wsdl at the original location, >>=20 >> ie. It is looking here: >>=20 >> https://provider.web-service.domain/path/ServiceName.wsdl >>=20 >> instead of the final resolved location, here: >>=20 >> https://provider.web-service.domain/path/ServiceName/another/diff/pat= h/ServiceName.wsdl >>=20 >> As expected, if i pass the resolved URL into SoapClient, it works. >>=20 >> This is not ideal because the resolved address can potentially change at a= ny time. >>=20 >> Is this a problem with SoapClient that can *and* need to be resolved? >>=20 >> Your thoughts. Thanks >>=20 >> superspace >>=20 >>=20 >>=20 >> The question on stackoverflow is here: >>=20 >> http://stackoverflow.com/questions/17226451/php-soapclient-couldnt-lo= ad-from-external-entity-where-endpoint-resolves-to-a >>=20 >> -- >> PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: >> http://www.php.net/unsub.php >>=20 >>=20 >>=20 >> -- >> PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http:/= /www.php.net/unsub.php >=20 > --=20 > PHP Soap Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >=20