我拋出一個Receiver的FaultCode,但客戶端收回「s:Server」作爲響應faultcode。 我怎樣才能得到「s:Receiver」的迴應?拋出faultcode(「Receiver」),但迴應「服務器」
我的代碼:
throw new FaultException<System.ApplicationException>(new System.ApplicationException("My application broke"), new FaultReason("because i said so"), new FaultCode("Receiver"));
響應:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Server</faultcode>
<faultstring xml:lang="en-US">because i said so</faultstring>
<detail>
<ApplicationException xmlns="http://schemas.datacontract.org/2004/07/System" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema">
...
</ApplicationException>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
+1我只是想寫相同的答案 –
仍然 s:服務器 –
capdragon
好的,我編輯了我的答案。 – luksan