axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa_abeysin...@yahoo.com>
Subject Re: Suggestion on receiving soap fault
Date Fri, 07 May 2004 03:40:58 GMT
Damitha,
    What is X in this case? 

>From non exception case:
> #define AXISC_THROW(X) return X
suggests that X must be int. 

If the exception model cannot use objects (i.e. throw and catch objects) that is not that
useful.

Also, if you are to use 
> #define AXISC_THROW(X) return X
then the methods invocation would look like:
> iStatus = ws.add(i1, i2, iResult);

But the prefferes way is

 result = ws.add(i1, i2);

Please clarify.

Thanks,
Samisa...



--- damitha@opensource.lk wrote:
> Hi Mark,
> Yes, that comes to the other part of the solution. What I plan is to use
> macros like this in the axis c++ libraries
> 
> #ifdef __ENABLE_AXIS_EXCEPTION__
> #define AXISC_TRY try {
> #define AXISC_CATCH(X) } catch (X) {
> #define AXISC_ENDCATCH }
> #define AXISC_THROW(X) throw AxisException(X)
> 
> #else //you don't want exception handling enabled
> #define AXISC_TRY
> #define AXISC_CATCH(X)
> #define AXISC_ENDCATCH
> #define AXISC_THROW(X) return X
> 
> #endif
> 
> So that the user of the library can disable exception handling if he
> wants. This is important when your service or client is written in C.
> 
> > damitha@opensource.lk wrote:
> >> Curretnly Axis C++ does not handle a soap body that contains a soap
> >> fault.
> > [snip]
> >> In addition SoapDeseriazer concatenate Faultcode, Faultstring,
> >> Faultactor
> >> and FaultDetail into a string. So when we receive iStatus = fail we can
> >> request
> >> the fault string that the SoapDeserializer stored as follows
> >>
> >> iStatus = ws.add(i1, i2, iResult);
> >> if(AXIS_SUCCESS == iStatus)
> >>     printf("Result : %d\n\n", iResult);
> >> else
> >> {
> >>     printf("Failed\n");
> >>     ws.getFaultDetail(&pcDetail);
> >>     printf("pcDetail:%s\n", pcDetail);
> >> }
> >>
> >> Any suggestions?
> >
> > Throw an exception with the error stuff inside it.
> >
> > If you insist on sticking with return codes, for goodness's sake don't
> > use the "getLastError" stuff - it's horribly vulnerable to threading
> > errors.
> agree
> 
> >
> > As an academic argument against your solution: You've removed all
> > functions from the system. Everything is a procedure with output
> > variables.
> >
> > - Mark
> 
> damitha
> 



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

Mime
View raw message