SOAP-ERROR:
Parsing WSDL: Couldn't load from
'file:/path/file.wsdl'
: failed to load external entity
"file:/path/file.wsdl"
En Debian jessy (8),
hay un error al llamar un documento WSDL del lado servidor en PHP que
vincule a otro documento WSDL con el tag “import”. Por ejemplo:
Sin embargo, esto no
sucede en Centos 6.5 por ejemplo. En la especificación de WSDL 1.1
https://www.w3.org/TR/wsdl
dice:
En este caso, para Centos funciona, pero para Debian no.
...2.1.1 Document Naming and LinkingWSDL documents can be assigned an optional name attribute of type NCNAME that serves as a lightweight form of documentation. Optionally, a targetNamespace attribute of type URI may be specified. The URI MUST NOT be a relative URI.
WSDL allows associating a namespace with a document location using an import statement:
<pre class="western"><definitions ....=""> </definitions></pre>
...
Mi solución fue del
lado servidor cambiar el llamado al WSDL de archivo a una url HTTP:
asi se llamaba:
file://ruta/file.wsdl
y asi se llama ahora
http://localhost/ruta/file.wsdl.
Espero les sirva el tip.
No hay comentarios:
Publicar un comentario