php - How do you intentionally cause a SoapFault for testing? -
i implemented soapclient interface handling rate requests federal express rate request web services. last night @ around 1 system returning soap fault conditions code handled it's response checking (it skips on , sends generic message if doesn't find valid rate response) isn't handled specifically.
when service down, show more useful message customers such faults when remote services down perhaps cut down calls our tech support. (the generic message says 'try again later', if know it's problem fedex services being down, can 'fedex rate service temporarily unavailable' people know it's not our site, theirs)
i've implemented code handle soapfault condition, have problem of 'how test it' fedex rate service down briefly last night.
is there way intentionally trigger soap condition, perhaps specific soap fault testing purposes?
i suggest using soapui mock service. can indicate response service return. point appliation mock service , test there. see post soapui website:
http://www.soapui.org/service-mocking/mocking-soap-services.html
Comments
Post a Comment