我正在抛出接收器的故障代码,但客户端正在返回“s:服务器”作为响应故障代码。我怎样才能得到“s: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>