ATL Web Server return values question?
-
Well, I guess yes, because if you will return something other then S_OK (like E_FAIL, whatever), the error can be intercepted before it will come to your code. Thus the result can be unknown, depending of the implemntation, maybe it will raise exception, maybe it will let it go.. Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have it!
Well in my C# application that consumes the web services it raises a SOAP exception and there is no defining information in the exception that will tell me why it failed. If I want to return rich error information from COM(i.e. IErrorInfo) then I am going to have to return this as either a parameter or a soap_header, but i do not want to specify an extra parameter in every method defined, so I am thinking of using a soap_header set as an out parameter..... Any thoughts......
-
After looking at the MS sample ATL Server projects is it better to always return S_OK from a method([web_method]) and pass back error information through either an out paremeter or through a soap header? Cheers Ollie:confused:
Well, I guess yes, because if you will return something other then S_OK (like E_FAIL, whatever), the error can be intercepted before it will come to your code. Thus the result can be unknown, depending of the implemntation, maybe it will raise exception, maybe it will let it go.. Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have it!