RES: [SOAP] SOAP-ERROR: Couldn't Load from external entity (Where endpoint resolves to another location)

[email protected] (Gerson Czelusniak Junior) Wed, 26 Jun 2013 11:59:59 +0000
Newsgroups php.soap
Message-ID <80940D84E43C0C45AA2C4A9B432B675A19D03520@SN2PRD0202MB120.namprd02.prod.outlook.com>
Good Morning,

Your webservice is in .NET APP or in PHP?
When you call the WSDL from Browser you can see the xml?


-----Mensagem original-----
De: superpspace [mailto:[email protected]]=20
Enviada em: ter=E7a-feira, 25 de junho de 2013 22:23
Para: [email protected]
Assunto: [SOAP] SOAP-ERROR: Couldn't Load from external entity (Where endpo=
int resolves to another location)

Hello everyone,

I have a WSDL in the following URL format (obscured):

    https://provider.web-service.domain/path/ServiceName?wsdl

that resolves to:

    https://provider.web-service.domain/path/ServiceName/another/diff/path/=
prefix_ServiceName.wsdl

The WSDL has a line like this:

    <wsdl:import namespace=3D"http://name/space/service/"=20
location=3D"ServiceName.wsdl"></wsdl:import>

When loading the former URL into SoapClient, it complains like so:

    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"

The reason i believe this happens is because it's trying to look for Servic=
eName.wsdl at the original location,

ie. It is looking here:

    https://provider.web-service.domain/path/ServiceName.wsdl

instead of the final resolved location, here:

    https://provider.web-service.domain/path/ServiceName/another/diff/path/=
ServiceName.wsdl

As expected, if i pass the resolved URL into SoapClient, it works.

This is not ideal because the resolved address can potentially change at an=
y time.

Is this a problem with SoapClient that can *and* need to be resolved?

Your thoughts. Thanks

superspace



The question on stackoverflow is here:

    http://stackoverflow.com/questions/17226451/php-soapclient-couldnt-load=
-from-external-entity-where-endpoint-resolves-to-a

--
PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://w=
ww.php.net/unsub.php