I'm surprised that this works. A 500 error should tell the Soap client that the the request failed and never bother to read the rest of the XML document.
This may work with the MS SOAP client but is likely to fail with most others.
+++ Rick ---
>>FWIW, this is really more of a COM question than specifically a Web Service question, that I've beat my head against the wall over many times.
>>
>>>Is there a way to make sure the Web Service terminate from the Error() event on its last line?
>>
>>COMRETURNERROR is the only way I've found.
>
>We do not use COMRETURNERROR as it's too slow and we prefer to use the following approach:
>
>
>FUNCTION Error(tnError AS Integer,tcMethod AS String,tnLine AS Integer)
>This.oResponse.Status='500 Internal Server Error'
>This.oSerializer.Init(This.oResponse)
>This.oSerializer.startEnvelope
>This.oSerializer.startBody
>This.oSerializer.startFault(tcMethod,MESSAGE())
>This.oSerializer.startFaultDetail
>This.oSerializer.endFaultDetail
>This.oSerializer.endFault
>This.oSerializer.endBody
>This.oSerializer.endEnvelope
>RETURN TO Process
>ENDFUNC
>
>
>The only downsize with this one is that we have to return somewhere. Returning to the higher level is ok. However, that assumes that the higher level is just a wrapper and that it knows how to go back when such situations are encounters.