axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@opensource.lk
Subject Suggestion on receiving soap fault
Date Thu, 06 May 2004 05:35:26 GMT
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




Mime
View raw message