撤消异常消息 [英] Returing Exception Message

查看:58
本文介绍了撤消异常消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有返回数据集的webservices函数。如果发生数据库错误

,可以在webservice中使用catch语句来检测并处理
处理它们。


但是,如何将该消息返回到客户端窗口应用程序

调用该webservice函数?我正在使用框架的1.1版。


WR

I have webservices functions that return datasets. If a database errors
happens, try catch statements can be used in the webservice to detect and
handle them.

However, how do I return that message to the client windows application that
called that webservice function? I am using version 1.1 of the framework.

WR

推荐答案

您可能想要返回SOAP错误消息,通过从您的Web服务抛出

SoapException。您可以在

代理端&上捕获SoapException。检查属性以查看失败的原因。

-

HTH,

Manoj G

MVP,Visual Developer
http://msmvps.com/manoj


" WhiskyRomeo" <瓦********* @ discussions.microsoft.com>在消息中写道

新闻:DD ********************************** @ microsof t.com ...
You may want to return a SOAP fault message, by means of throwing an
SoapException from your web service. You can catch the SoapException on the
proxy side & check the properties to see the reason for the failure.

--
HTH,
Manoj G
MVP, Visual Developer
http://msmvps.com/manoj

"WhiskyRomeo" <Wh*********@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
我有返回数据集的webservices函数。如果发生数据库错误,可以在web服务中使用try语句来检测和处理它们。

但是,如何将该消息返回给客户端窗口应用程序

称为webservice功能?我正在使用框架的1.1版。

WR
I have webservices functions that return datasets. If a database errors
happens, try catch statements can be used in the webservice to detect and
handle them.

However, how do I return that message to the client windows application
that
called that webservice function? I am using version 1.1 of the framework.

WR



我不知道这意味着什么。我只是希望在

客户端中处理exeception。我需要的只是异常处理例程的行为类似于

如果一个sub在客户端上调用另一个sub。在那里你可以处理被叫子或调用子中的

异常。为什么这个工作不一样

方式?


WR


" Manoj G [MVP ]"写道:
I have no idea what that means. I simply want the exeception to be handled in
client. All I need is for the exception handling routine to behave like it
would if one sub called another sub on the client. There you can handle the
exception in the called sub or calling sub. Why doesn''t this work the same
way?

WR

"Manoj G [MVP]" wrote:
您可能希望通过从Web服务中抛出一个
SoapException来返回SOAP错误消息。您可以在
代理端&上捕获SoapException。检查属性以查看失败的原因。
-
HTH,
Manoj G
MVP,Visual Developer
http://msmvps.com/manoj

WhiskyRomeo <瓦********* @ discussions.microsoft.com>在消息中写道
新闻:DD ********************************** @ microsof t.com。 ..
You may want to return a SOAP fault message, by means of throwing an
SoapException from your web service. You can catch the SoapException on the
proxy side & check the properties to see the reason for the failure.

--
HTH,
Manoj G
MVP, Visual Developer
http://msmvps.com/manoj

"WhiskyRomeo" <Wh*********@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
我有返回数据集的webservices函数。如果发生数据库错误,可以在web服务中使用try语句来检测和处理它们。

但是,如何将该消息返回给客户端窗口应用程序

称为webservice功能?我使用的是框架的1.1版。

WR
I have webservices functions that return datasets. If a database errors
happens, try catch statements can be used in the webservice to detect and
handle them.

However, how do I return that message to the client windows application
that
called that webservice function? I am using version 1.1 of the framework.

WR




使用Webserice的主要原因简单,可重用性等。


我的建议是为服务器(Web服务)端获得的任何类型的

错误发送一般错误消息。因此,对于客户来说,这种实施很容易。



WhiskyRomeo写道:
Main reason of using Webserice is simplicity, reusability etc.

My recommendation would be to send a generic error message for any type of
error you get at server (Web Service) side. So, that impementation is easy
for clients.

"WhiskyRomeo" wrote:
我不知道这意味着什么。我只是希望在
客户端中处理该异常。我需要的只是异常处理例程表现得像它在一个子客户端上调用另一个子。在那里,您可以处理被调用子或调用子中的
异常。为什么这个工作不一样?

WR

Manoj G [MVP]"写道:
I have no idea what that means. I simply want the exeception to be handled in
client. All I need is for the exception handling routine to behave like it
would if one sub called another sub on the client. There you can handle the
exception in the called sub or calling sub. Why doesn''t this work the same
way?

WR

"Manoj G [MVP]" wrote:
您可能希望通过从Web服务中抛出一个
SoapException来返回SOAP错误消息。您可以在
代理端&上捕获SoapException。检查属性以查看失败的原因。
-
HTH,
Manoj G
MVP,Visual Developer
http://msmvps.com/manoj

WhiskyRomeo <瓦********* @ discussions.microsoft.com>在消息中写道
新闻:DD ********************************** @ microsof t.com。 ..
You may want to return a SOAP fault message, by means of throwing an
SoapException from your web service. You can catch the SoapException on the
proxy side & check the properties to see the reason for the failure.

--
HTH,
Manoj G
MVP, Visual Developer
http://msmvps.com/manoj

"WhiskyRomeo" <Wh*********@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
我有返回数据集的webservices函数。如果发生数据库错误,可以在web服务中使用try语句来检测和处理它们。

但是,如何将该消息返回给客户端窗口应用程序

称为webservice功能?我正在使用该框架的1.1版。

WR
I have webservices functions that return datasets. If a database errors
happens, try catch statements can be used in the webservice to detect and
handle them.

However, how do I return that message to the client windows application
that
called that webservice function? I am using version 1.1 of the framework.

WR




这篇关于撤消异常消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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