1
我有一個soap web服務,其中響應正文包含一些轉義xml。 所以在響應的身體,我有:NetDispatcherFaultException返回轉義xml時出錯
<soap:Body>
<GetServiceResponse xmlns="http://www.abc.com/x/">
<GetServiceResult>
<Result>
<Value>&lt;/param&gt; etc....</Value>
</Result>
</GetServiceResult>
</GetServiceResponse>
</soap:Body>
在我的客戶我得到一個異常NetDispatcherFaultException「格式化拋出一個異常,而試圖反序列化」。我使用的客戶端上下面的代碼:
var binding = new BasicHttpBinding();
var address = new EndpointAddress("http://localhost:2948/ReportingService.asmx");
ReportingServiceSoap service = new ReportingServiceSoapClient(binding, address);
var response = service.GetConfig(request); <-- Exception raised on call
如果我更換了一些字符串值(沒有逃脫XML),然後客戶端不引發異常轉義文本。
任何想法在哪裏看?
JD