axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <>
Subject Re: Suggestion on receiving soap fault
Date Fri, 07 May 2004 11:31:08 GMT

But this'll only work if they compile the base code again right? This is
restrictive. Wouldn't it be better to try and remove all these compile time
dependencies so we can just let people use the code without recompilation
all the time?

John Hawkins,

             06/05/2004 09:18          "Apache AXIS C User List"           
             Please respond to                                             
              "Apache AXIS C                                       Subject 
                User List"             Re: Suggestion on receiving soap    

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

#define AXISC_TRY try {
#define AXISC_CATCH(X) } catch (X) {
#define AXISC_THROW(X) throw AxisException(X)

#else //you don't want exception handling enabled
#define AXISC_TRY
#define AXISC_CATCH(X)
#define AXISC_THROW(X) return X


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.

> 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.

> As an academic argument against your solution: You've removed all
> functions from the system. Everything is a procedure with output
> variables.
> - Mark


View raw message