axis-c-dev 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 Thu, 06 May 2004 08:19:11 GMT
I too think that function call should look like:
    result = ws.add(i1, i2);
and not
> iStatus = ws.add(i1, i2, iResult);

Exception model is preffered for fault mapping.
Howver an unconditional API call like:
    ws.getFaultDetail(&pcDetail);
could also be used after each method invocation to track errors.

Thnaks,
Samisa...


--- damitha@opensource.lk wrote:
> Hi,
> 
> Curretnly Axis C++ does not handle a soap body that contains a soap fault.
> When we receive a soap fault, I have suggestions how to handle it.
> Suppose that we request to add two numbers in the calculator sample.
> in the current code
> iResult = ws.add(i1, i2); But then we cannot get the status of the
> response, success or fail. Instead if we have
> iStatus = ws.add(i1, i2, iResult) where i1, i2 are the numbers to add,
> iResult is to accept the result of the addition and iStatus is the status
> of the response, success or failure.
> 
> So if server returns soap fault we should have iStatus = fail.
> 
> 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?
> 
> regds
> damitha
> 
> 
> 



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

Mime
View raw message