将FaultContract添加到日内瓦 [英] Add FaultContract to Geneva

查看:111
本文介绍了将FaultContract添加到日内瓦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在日内瓦是否有办法让我们抛出类型化的FaultExceptions?

这引出了我的3个问题。

1.我从哪里添加FaultContract属性无法控制WCF服务接口?
2. WSDL是否包含类型化故障的元数据?第3章将日内瓦传播或现在如何处理类型化故障,而不是吞下它?

谢谢,Jim

解决方案

我在创建服务时通过在运行时向服务操作添加FaultDescription来解决问题主机

Is there a way in Geneva for us to throw typed FaultExceptions?

That raises 3 questions of mine.

1. where to I add the FaultContract attribute since we have no control over the WCF service interface?
2. will the WSDL contain the meta data of the typed Fault?
3. will Geneva propagate or now how to handle the typed fault, and not swallow it?


Thanks, Jim

解决方案

I worked it out by adding a FaultDescription to the Service Operation at runtime when creating the service host


这篇关于将FaultContract添加到日内瓦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆