I have a PHP5 Soap Server running and I'd like to catch type mismatches but I don't think they're even getting into my code.
我有一個PHP5肥皂服務器運行,我想捕獲類型不匹配,但我不認為他們甚至進入我的代碼。
What's happening is this, in my WSDL I've got (simplified):
發生了什么事,在我的WSDL中,我得到了(簡化):
which is fine, and comes through correctly as long as there's an Integer (or null) in the Publish Radius field. But if I try to send through a non-integer, I get nothing back in the response besides this:
這很好,只要在Publish Radius字段中有一個Integer(或null),它就會正確顯示。但是,如果我嘗試通過非整數發送,除此之外我在回復中得不到任何回復:
SOAP-ENV:Server
SOAP-ERROR: Encoding: Violation of encoding rules
I'd like to catch this and return something more useful, but it doesn't even seem to be getting into my logic. Any suggestions?
我想抓住這個並返回更有用的東西,但它似乎甚至沒有進入我的邏輯。有什么建議?
1 个解决方案
#1
I believe the error (SOAP Fault) you are seeing is being generated by the Soap Client and not being sent to the SOAP Server.
我相信您看到的錯誤(SOAP Fault)是由Soap Client生成的,而不是發送到SOAP Server。