Re: Returing Exception Message

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



can you provide a short example of this or a link to a document?

"Marvin Smit" wrote:

> Hi,
>
> yes.. that is correct. That will give you the general soap fault. You
> can however make it more explicit by throwing a "SoapException"
> yourself and fill in more details.
>
> Hope this helps,
>
> Marvin Smit.
>
> On Mon, 14 Nov 2005 01:51:09 -0800, "WhiskyRomeo"
> <WhiskyRomeo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> >I am using Visual Studio and I implemented my webservice through Visual Studio.
> >
> >Are you saying rathing than catching the exception in the webservice, simply
> >throw the exception and catch it in the windows client?
> >
> >Bill
> >
> >"Marvin Smit" wrote:
> >
> >> Hi,
> >>
> >> If you are using MS Visual Studio and implement your WebService, you
> >> can just "throw exceptions". The WebService framework will translate
> >> these into SOAP faults and transmit them over the wire. The client
> >> will recognize this SOAP fault, and throw the exception on the client
> >> side.
> >>
> >> Hope this helps,
> >>
> >> Marvin Smit.
> >>
> >> On Fri, 11 Nov 2005 07:37:02 -0800, "WhiskyRomeo"
> >> <WhiskyRomeo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >> >Again, how? I do not understand how you return any type of error message
> >> >from the web service to the windows client.
> >> >
> >> >WR
> >> >
> >> >"CG" wrote:
> >> >
> >> >> 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:
> >> >>
> >> >> > 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:
> >> >> >
> >> >> > > 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" <WhiskyRomeo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> >> > > news:DD3FD9FE-19B7-4131-A406-911536EDF8D0@xxxxxxxxxxxxxxxx
> >> >> > > >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
> >> >> > >
> >> >> > >
> >> >> > >
> >>
>
.



Relevant Pages

  • Re: Code design ideas?
    ... app and the webservice, etc. ... Errors of type 1 should be handled by the client side. ... Usually it is the Message of the Exception. ... severity levels: warning and error. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: WSE 2.0 and structured Exceptionhandling
    ... all Webservice inherit from a base webservice class ... This Document is then passed along to the SoapException. ... On the client, I've created a WebServiceInvokationException which unwraps ... >> When I throw an exception on the server side, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • RE: Problemes with custom Webservices and security.
    ... that generates exception in your finally block. ... the ASP.NET will redirect your client to the error page. ... security context. ... > I have a client that calls a Webservice, ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Returing Exception Message
    ... If you are using MS Visual Studio and implement your WebService, ... and throw the exception on the client ... All I need is for the exception handling routine to behave like it ... >>> would if one sub called another sub on the client. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: howto get exception information from asp.net webservice, without try and catch
    ... Typically the client of your webservice is not a human, so passing back HTML makes little sense. ... The SOAP protocol includes error handing with SoapFaults, so you should let the web service framework map the error on your side to the SoapFault back to the client. ... thrown exception anymore. ...
    (microsoft.public.dotnet.framework.aspnet)