axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject Re: Suggestion on receiving soap fault
Date Fri, 07 May 2004 10:00:22 GMT




Hi,

Do we have a Message class and thus a FaultMessage class?

I would much prefer if we returned FaultMessages from the getFaultDetail
method e.g.

    FaultMessage[] fault = ws.getFaultDetail();




John Hawkins,



                                                                           
             damitha@opensourc                                             
             e.lk                                                          
                                                                        To 
             06/05/2004 06:35          axis-c-dev@ws.apache.org,           
                                       axis-c-user@ws.apache.org           
                                                                        cc 
             Please respond to                                             
              "Apache AXIS C                                       Subject 
             Developers List"          Suggestion on receiving soap fault  
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




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