Handling Soap timeouts in PHP

前端 未结 8 1780
囚心锁ツ
囚心锁ツ 2021-01-30 09:05

I\'m working on a project where I am verifying information from a user with a SOAP web service. I currently am taking care of errors assuming that I\'m receiving responses from

8条回答
  •  孤街浪徒
    2021-01-30 09:50

    From my experience, if $e->getMessage is "Error Fetching http headers", you are dealing with a network timeout.

    If $e->getMessage is something like "Cannot connect to host", the service you are trying to reach is down.

    Then there is "Looks like we got no XML document", which is more cryptic an can mean different things.

提交回复
热议问题