SOAP PHP fault parsing WSDL: failed to load external entity?

前端 未结 12 1876
耶瑟儿~
耶瑟儿~ 2020-11-27 05:37

I\'m trying to run a web service using PHP & SOAP, but all I\'m getting so far is this:

(SoapFault)[2] message which states: \'SOAP-ERROR: Parsing

12条回答
  •  情歌与酒
    2020-11-27 06:21

    If you use docker there is a chance you get error because of OpenSSL default security level.

    You need lower seclevel in /etc/ssl/openssl.cnf from DEFAULT@SECLEVEL=2 to DEFAULT@SECLEVEL=1

    Or just add into Dockerfile

    RUN sed -i "s|DEFAULT@SECLEVEL=2|DEFAULT@SECLEVEL=1|g" /etc/ssl/openssl.cnf
    

    Source: https://github.com/dotnet/runtime/issues/30667#issuecomment-566482876

    After that change I can run SoapClient without any additional options


    You can verify it by run on container

    curl -A 'cURL User Agent' -4 https://ewus.nfz.gov.pl/ws-broker-server-ewus/services/Auth?wsdl
    

提交回复
热议问题