On 8/31/05, Jarmo Doc <[EMAIL PROTECTED]
> wrote:
The implementation would probably be something like this:
void deleteEmployee(int empid) throws SOAPException
{
try
{
// delete employee here
}
catch (Exception exx)
{
throw new SOAPException(exc);
}
}
>From: Rogério Luz < [EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: Explicit response required from WS methods?
>Date: Wed, 31 Aug 2005 12:54:09 -0300
>
>Depends on what service.deleteEmployee() method do. If you have a try/catch
>there and an Exception is thrown you'll never know if your delete really
>happaned. Certainly if line 2 executes, line 1 was executed or at least was
>called.
>
>On 8/31/05, Jarmo Doc <[EMAIL PROTECTED]> wrote:
> >
> > OK, but is it actually required? If my client executes the following:
> >
> > 1. service.deleteEmployee(5);
> > 2. System.out.println("deleted empid 5");
> >
> > Is execution of line 2 a guarantee that line 1 succeeded?
> >
> >
> > >From: Rogério Luz <[EMAIL PROTECTED]>
> > >Reply-To: [email protected]
> > >To: [email protected]
> > >Subject: Re: Explicit response required from WS methods?
> > >Date: Wed, 31 Aug 2005 12:43:41 -0300
> > >
> > >I think it would be a good practice return at least a boolean to ensure
> > >your
> > >deleteEmployee method really deleted an employee.
> > >
> > >On 8/31/05, Jarmo Doc < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Let's say that I have a WS method like so:
> > > >
> > > > deleteEmployee(int empid) throws SOAPException
> > > > {
> > > > }
> > > >
> > > > Is it sensible for this method to have a void return type or should
>it
> > > > always return something, for example the empid just deleted (for
> > client
> > > > correlation purposes, amongst other things)?
> > > >
> > > > I ask because it's not clear to me what's going on under the covers.
>I
> > > > could imagine, for example, that void would be OK because any kind
>of
> > > > problem explicitly detected by the web service method would throw a
> > > > SOAPException and any kind of network issue (e.g. request not even
> > >making
> > > > it
> > > > to the web service) or a failure of the service to execute the
>method
> > > > might
> > > > cause the underlying infrastructure itself to throw a SOAPException
> > > > (because, for example, HTTP 200 OK was never seen by the client). So
> > the
> > > > absence of a SOAPException might reasonably imply success and hence
>no
> > > > return type was required.
> > > >
> > > > Thanks.
> > > >
> > > > _________________________________________________________________
> > > > Don't just search. Find. Check out the new MSN Search!
> > > > http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> > > >
> > > >
> > >
> > >
> > >--
> > >[]´s
> > >
> > >Rogério Luz
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today - it's
>FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> >
>
>
>--
>[]´s
>
>Rogério Luz
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
--
[]´s
Rogério Luz
