Have a look at the various scenarios in the WS-I Usage Scenarios spec
http://www.ws-i.org/SampleApplications/SupplyChainManagement/2003-12/Usa
geScenarios-1.01.pdf - (not as scary as it sounds). 

If you care about whether the operation really happened, or you want to
be able to receive a fault if anything went wrong, then use the
synchronous request/response scenario. 

If you don't care (known as a "fire and forget" message) then use the
"one way" scenario.

-----Original Message-----
From: Jarmo Doc [mailto:[EMAIL PROTECTED] 
Sent: 31 August 2005 16:39
To: [email protected]
Subject: Explicit response required from WS methods?

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/



 
CONFIDENTIALITY & PRIVILEGE NOTICE

This e-mail is confidential to its intended recipient. It may also be 
privileged. Neither the confidentiality nor any privilege attaching to this 
e-mail is waived lost or destroyed by reason that it has been mistakenly 
transmitted to a person or entity other than its intended recipient. If you are 
not the intended recipient please notify us immediately by telephone or fax at 
the numbers provided above or e-mail by Reply To Author and return the printed 
e-mail to us by post at our expense. We believe, but do not warrant, that this 
e-mail and any attachments are virus-free, but you should check. We may monitor 
traffic data of both business and personal e-mails. We are not liable for any 
opinions expressed by the sender where this is a non-business e-mail. If you do 
not receive all the message, or if you have difficulty with the transmission, 
please telephone us immediately.

Reply via email to